cURL
curl -X GET 'https://miyaip.com/api/ProxyLogic/BandwidthAnalysis' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN>'const url = 'https://miyaip.com/api/ProxyLogic/BandwidthAnalysis';
const response = await fetch(url, {
method: 'GET',
headers: {
"Accept": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>"
},
});
const result = await response.text();
console.log(result);import requests
url = "https://miyaip.com/api/ProxyLogic/BandwidthAnalysis"
headers = {
"Accept": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>"
}
response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.text){
"code": 200,
"message": "Success",
"body": {
"totalBandWidth": 100,
"usedBandwidth": 24.75,
"mobileTotalBandWidth": 20,
"mobileUsedBandwidth": 3.2
}
}{
"code": 500,
"message": "Invalid request",
"body": null
}Account and usage
MiyaIP bandwidth API: residential and mobile traffic usage
Read MiyaIP residential and mobile total and used traffic with the BandwidthAnalysis API, using a Bearer token and preserving the returned field names.
cURL
curl -X GET 'https://miyaip.com/api/ProxyLogic/BandwidthAnalysis' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN>'const url = 'https://miyaip.com/api/ProxyLogic/BandwidthAnalysis';
const response = await fetch(url, {
method: 'GET',
headers: {
"Accept": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>"
},
});
const result = await response.text();
console.log(result);import requests
url = "https://miyaip.com/api/ProxyLogic/BandwidthAnalysis"
headers = {
"Accept": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>"
}
response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.text){
"code": 200,
"message": "Success",
"body": {
"totalBandWidth": 100,
"usedBandwidth": 24.75,
"mobileTotalBandWidth": 20,
"mobileUsedBandwidth": 3.2
}
}{
"code": 500,
"message": "Invalid request",
"body": null
}Read total and used traffic for residential and mobile products associated with the authenticated account.
Inspect traffic values
- Obtain a token from Log in and fill in the Bearer credential.
- Send the request without a JSON body and check the HTTP and business results.
- Read residential values from
totalBandWidthandusedBandwidth, and mobile values frommobileTotalBandWidthandmobileUsedBandwidth.
Online debugging
Source: official bandwidth reference.Authorizations
Use token from the login response in the Authorization: Bearer header. The source does not specify token lifetime or refresh behavior.