Get Subscribed Countries

Estimated reading: 4 minutes

The Get Countries API provides a list of available countries where VPN servers are located, tailored to the specific device requesting the information. This information is crucial for users to select their desired VPN server location.

Get Countries (v3)

  • URL: <base url>/inventory/v3/countries/<sDeviceType>
  • Request Method: GET

Use this API to get a complete list of subscribed Countries.

Returns a JSON object that contains the Countries.

Payload

KeyTypePass inDescription
X-AccessToken*StringHeaderaccessToken retrieved from Get Access Token endpoint
sDeviceType*StringPathType of device
Possible values: android | ios | mac | windows
(*) Required Parameter

Response

KeyTypeDescription
headerJSONJSON object that describes return code and message.
bodyJSONJSON object that returns countries array containing objects.
countriesArrayArray of object that contains details related to country.

Sample Response

{
  "header": {
    "code": 1,
    "message": "success"
    "response_code": 1,
  },
  "body": {
    "countries": [{
      "id": 254,
      "country": "US",
      "name": "United States",
      "iso_code": "US",
      "latitude": 37.090240000000001,
      "longitude": -95.712890999999999,
      "is_smart_dns": 0,
      "is_virtual": 0,
      "is_freemium": true,
      "rank": 0,
      "recommended_protocol": "IKEV",
      "data_centers":[],
      "protocols": [{
        "number": 1,
        "protocol": "PPTP",
        "dns": [{
          "configuration_version": "",
          "name": "**.********.com",
          "type": "primary",
          "acknowledgement_server": "**.********.com",
          "port_number": 0,
          "is_multiport": 0
          "multiport_range": "80"
          "ip_translation": "nat"
          "tags": []
          }
          {
          "number": 8,
          "protocol": "TCP",
          "dns": [{
              "configuration_version": "2.0",
              "name": "**.********.com",
              "type": "primary",
              "acknowledgement_server": "**.********.com",
              "port_number": 80,
              "is_multiport": 0
              "multiport_range": "80, 5500-30000"
              "ip_translation": "nat"
              "tags": []
            }]
        }]
      "features":[,
         "OVPN_OBF",
         "p2p",
         "QR",
         ]
      }]
    }]
  }
}

Get Countries (v2)

  • URL: <base url>/inventory/v2/countries/<sDeviceType>
  • Request Method: GET

Use this API to get a complete list of subscribed Countries.

Returns a JSON object that contains the Countries.

Payload

KeyTypePass inDescription
X-AccessToken*StringHeaderaccessToken retrieved from Get Access Token endpoint
sDeviceType*StringPathType of device
Possible values: android | ios | mac | windows
(*) Required Parameter

Response

KeyTypeDescription
headerJSONJSON object that describes return code and message.
bodyJSONJSON object that returns countries array containing objects.
countriesArrayArray of object that contains details related to country.

Sample Response

{
  "header": {
    "code": 1,
    "message": "success"
    "response_code": 1,
  },
  "body": {
    "countries": [{
      "id": 254,
      "country": "US",
      "name": "United States",
      "iso_code": "US",
      "latitude": 37.090240000000001,
      "longitude": -95.712890999999999,
      "is_smart_dns": 0,
      "is_virtual": 0,
      "rank": 0,
      "is_freemium": true,
      "recommended_protocol": "IKEV",
      "data_centers":[],
      "protocols": [{
        "number": 1,
        "protocol": "PPTP",
        "dns": [{
          "configuration_version": "",
          "name": "**.********.com",
          "type": "primary",
          "acknowledgement_server": "**.********.com",
          "port_number": 0,
          "is_multiport": 0
          "multiport_range": "80"
          "ip_translation": "nat"
          "tags": []
          }
          {
          "number": 8,
          "protocol": "TCP",
          "dns": [{
              "configuration_version": "2.0",
              "name": "**.********.com",
              "type": "primary",
              "acknowledgement_server": "**.********.com",
              "port_number": 80,
              "is_multiport": 0
              "multiport_range": "80, 5500-30000"
              "ip_translation": "nat"
              "tags": []
            }]
        }]
      "features":[,
         "OVPN_OBF",
         "p2p",
         "QR",
         ]
      }]
    }]
  }
}
Share this Doc

Get Subscribed Countries

Or copy link

On This Page