cURL
curl -X POST 'https://miyaip.com/api/UserShort/GenerateIps' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
--data '{
"CountryCode": "US",
"StateCode": "CA",
"Count": 1
}'const url = 'https://miyaip.com/api/UserShort/GenerateIps';
const response = await fetch(url, {
method: 'POST',
headers: {
"Accept": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"CountryCode": "US",
"StateCode": "CA",
"Count": 1
}),
});
const result = await response.text();
console.log(result);import requests
url = "https://miyaip.com/api/UserShort/GenerateIps"
headers = {
"Accept": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>"
}
payload = {
"CountryCode": "US",
"StateCode": "CA",
"Count": 1
}
response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.text){
"code": 200,
"message": "Success",
"body": {
"proxyList": [
"gateway.miyaip.com:10000:username:********"
],
"failedList": [],
"requestCount": 1,
"failedCount": 0
}
}{
"code": 500,
"message": "Invalid request",
"body": null
}Proxy generation
MiyaIP short-lived residential API: generate proxy IPs
Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.
cURL
curl -X POST 'https://miyaip.com/api/UserShort/GenerateIps' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
--data '{
"CountryCode": "US",
"StateCode": "CA",
"Count": 1
}'const url = 'https://miyaip.com/api/UserShort/GenerateIps';
const response = await fetch(url, {
method: 'POST',
headers: {
"Accept": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"CountryCode": "US",
"StateCode": "CA",
"Count": 1
}),
});
const result = await response.text();
console.log(result);import requests
url = "https://miyaip.com/api/UserShort/GenerateIps"
headers = {
"Accept": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>"
}
payload = {
"CountryCode": "US",
"StateCode": "CA",
"Count": 1
}
response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.text){
"code": 200,
"message": "Success",
"body": {
"proxyList": [
"gateway.miyaip.com:10000:username:********"
],
"failedList": [],
"requestCount": 1,
"failedCount": 0
}
}{
"code": 500,
"message": "Invalid request",
"body": null
}Generate short-lived residential proxies for your account. Each generated proxy is valid for 24 hours according to the source reference.
Sending this request consumes your short-lived IP allowance. Check the country, optional state, and quantity before sending. The debugger does not automatically retry generation requests.
Generate a batch
- Obtain an access token from Log in and enter it as the Bearer credential.
- Fill in the required
CountryCodeandCount. Use an uppercase ISO country code and, if needed, the optionalStateCodefrom the supported locations. - Send once and check the HTTP and business results. Read
proxyListandfailedList, then comparerequestCountwithfailedCountrather than assuming every requested proxy was generated.
Count from 1 to 100. This documents the interface’s input range; it does not guarantee that your account has enough allowance or that every location is available. The source does not provide a complete country and state enumeration.
If a request times out or is canceled, review your account before sending another batch. A missing response does not prove that generation did not occur. See API response handling.
Online debugging
Source: official short-lived generation reference.Authorizations
Use token from the login response in the Authorization: Bearer header. The source does not specify token lifetime or refresh behavior.
Body
application/json
Uppercase ISO country code. Use /api/Location/SearchUserShort to list available countries.
Example:
"US"
Number of short-term proxies to generate, between 1 and 100.
Example:
1
Optional state or province code within the selected country.
Example:
"CA"