Ephemeral Proxies

Datacenter

checkDatacenterProxiesStatus

Check datacenter proxies service status

It returns the current status of the service, including the total number of datacenter proxies available and grouped by country.


/v2/datacenter/service_status

Usage and SDK Samples

curl -X GET\
-H "X-RapidAPI-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://ephemeral-proxies.p.rapidapi.com/v2/datacenter/service_status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatacenterApi;

import java.io.File;
import java.util.*;

public class DatacenterApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        DatacenterApi apiInstance = new DatacenterApi();
        try {
            ServiceStatus result = apiInstance.checkDatacenterProxiesStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatacenterApi#checkDatacenterProxiesStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatacenterApi;

public class DatacenterApiExample {

    public static void main(String[] args) {
        DatacenterApi apiInstance = new DatacenterApi();
        try {
            ServiceStatus result = apiInstance.checkDatacenterProxiesStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatacenterApi#checkDatacenterProxiesStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-RapidAPI-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-RapidAPI-Key"];

DatacenterApi *apiInstance = [[DatacenterApi alloc] init];

// Check datacenter proxies service status
[apiInstance checkDatacenterProxiesStatusWithCompletionHandler: 
              ^(ServiceStatus output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EphemeralProxies = require('ephemeral_proxies');
var defaultClient = EphemeralProxies.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-RapidAPI-Key'] = "Token"

var api = new EphemeralProxies.DatacenterApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.checkDatacenterProxiesStatus(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class checkDatacenterProxiesStatusExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("X-RapidAPI-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-RapidAPI-Key", "Bearer");

            var apiInstance = new DatacenterApi();

            try
            {
                // Check datacenter proxies service status
                ServiceStatus result = apiInstance.checkDatacenterProxiesStatus();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatacenterApi.checkDatacenterProxiesStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-RapidAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-RapidAPI-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDatacenterApi();

try {
    $result = $api_instance->checkDatacenterProxiesStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DatacenterApi->checkDatacenterProxiesStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DatacenterApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-RapidAPI-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-RapidAPI-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DatacenterApi->new();

eval { 
    my $result = $api_instance->checkDatacenterProxiesStatus();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatacenterApi->checkDatacenterProxiesStatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['X-RapidAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-RapidAPI-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DatacenterApi()

try: 
    # Check datacenter proxies service status
    api_response = api_instance.check_datacenter_proxies_status()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatacenterApi->checkDatacenterProxiesStatus: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation

Status: 403 - Forbidden


extendProxy

Extend expiration time of a datacenter proxy

By calling this endpoint the expiration time of an already allocated proxy will be extended by 30 mins. Successive calls will keep incrementing the expiration time, up to a maximum of 24 hours.


/v2/datacenter/extend_proxy

Usage and SDK Samples

curl -X GET\
-H "X-RapidAPI-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://ephemeral-proxies.p.rapidapi.com/v2/datacenter/extend_proxy?id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatacenterApi;

import java.io.File;
import java.util.*;

public class DatacenterApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        DatacenterApi apiInstance = new DatacenterApi();
        String id = id_example; // String | The proxy identifier to extend the expiration time. This identifier can be obtained from the response of /v2/datacenter/proxy, field proxy.id.

        try {
            GetProxySuccessfulOperation result = apiInstance.extendProxy(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatacenterApi#extendProxy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatacenterApi;

public class DatacenterApiExample {

    public static void main(String[] args) {
        DatacenterApi apiInstance = new DatacenterApi();
        String id = id_example; // String | The proxy identifier to extend the expiration time. This identifier can be obtained from the response of /v2/datacenter/proxy, field proxy.id.

        try {
            GetProxySuccessfulOperation result = apiInstance.extendProxy(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatacenterApi#extendProxy");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-RapidAPI-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-RapidAPI-Key"];
String *id = id_example; // The proxy identifier to extend the expiration time. This identifier can be obtained from the response of /v2/datacenter/proxy, field proxy.id.


DatacenterApi *apiInstance = [[DatacenterApi alloc] init];

// Extend expiration time of a datacenter proxy
[apiInstance extendProxyWith:id
              completionHandler: ^(GetProxySuccessfulOperation output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EphemeralProxies = require('ephemeral_proxies');
var defaultClient = EphemeralProxies.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-RapidAPI-Key'] = "Token"

var api = new EphemeralProxies.DatacenterApi()
var id = id_example; // {{String}} The proxy identifier to extend the expiration time. This identifier can be obtained from the response of /v2/datacenter/proxy, field proxy.id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.extendProxy(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class extendProxyExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("X-RapidAPI-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-RapidAPI-Key", "Bearer");

            var apiInstance = new DatacenterApi();
            var id = id_example;  // String | The proxy identifier to extend the expiration time. This identifier can be obtained from the response of /v2/datacenter/proxy, field proxy.id.


            try
            {
                // Extend expiration time of a datacenter proxy
                GetProxySuccessfulOperation result = apiInstance.extendProxy(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatacenterApi.extendProxy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-RapidAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-RapidAPI-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDatacenterApi();
$id = id_example; // String | The proxy identifier to extend the expiration time. This identifier can be obtained from the response of /v2/datacenter/proxy, field proxy.id.


try {
    $result = $api_instance->extendProxy($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DatacenterApi->extendProxy: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DatacenterApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-RapidAPI-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-RapidAPI-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DatacenterApi->new();
my $id = id_example; # String | The proxy identifier to extend the expiration time. This identifier can be obtained from the response of /v2/datacenter/proxy, field proxy.id.


eval { 
    my $result = $api_instance->extendProxy(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatacenterApi->extendProxy: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['X-RapidAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-RapidAPI-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DatacenterApi()
id = id_example # String | The proxy identifier to extend the expiration time. This identifier can be obtained from the response of /v2/datacenter/proxy, field proxy.id.


try: 
    # Extend expiration time of a datacenter proxy
    api_response = api_instance.extend_proxy(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatacenterApi->extendProxy: %s\n" % e)

Parameters

Query parameters
Name Description
id*
String
The proxy identifier to extend the expiration time. This identifier can be obtained from the response of /v2/datacenter/proxy, field proxy.id.
Required

Responses

Status: 200 - successful operation

Status: 403 - Forbidden


getDatacenterProxy

Obtain a new datacenter proxy

The connection proxy details are `proxy.host` and `proxy.port` from the response fields. The proxy will allow connections from the same source IP as the one making this API call. Make use of the `whitelist_ip` parameter to allow an additional ip. Countries can be selected by using the `countries` parameter, otherwise the country is randomly selected. A list of countries is available on *Service Status* endpoint. The proxy is available for 30 mins.


/v2/datacenter/proxy

Usage and SDK Samples

curl -X GET\
-H "X-RapidAPI-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://ephemeral-proxies.p.rapidapi.com/v2/datacenter/proxy?whitelist_ip=&countries="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatacenterApi;

import java.io.File;
import java.util.*;

public class DatacenterApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        DatacenterApi apiInstance = new DatacenterApi();
        String whitelistIp = whitelistIp_example; // String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

        String countries = countries_example; // String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU

        try {
            GetProxySuccessfulOperation result = apiInstance.getDatacenterProxy(whitelistIp, countries);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatacenterApi#getDatacenterProxy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatacenterApi;

public class DatacenterApiExample {

    public static void main(String[] args) {
        DatacenterApi apiInstance = new DatacenterApi();
        String whitelistIp = whitelistIp_example; // String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

        String countries = countries_example; // String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU

        try {
            GetProxySuccessfulOperation result = apiInstance.getDatacenterProxy(whitelistIp, countries);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatacenterApi#getDatacenterProxy");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-RapidAPI-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-RapidAPI-Key"];
String *whitelistIp = whitelistIp_example; // The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.
 (optional)
String *countries = countries_example; // List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU
 (optional)

DatacenterApi *apiInstance = [[DatacenterApi alloc] init];

// Obtain a new datacenter proxy
[apiInstance getDatacenterProxyWith:whitelistIp
    countries:countries
              completionHandler: ^(GetProxySuccessfulOperation output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EphemeralProxies = require('ephemeral_proxies');
var defaultClient = EphemeralProxies.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-RapidAPI-Key'] = "Token"

var api = new EphemeralProxies.DatacenterApi()
var opts = { 
  'whitelistIp': whitelistIp_example, // {{String}} The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

  'countries': countries_example // {{String}} List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDatacenterProxy(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getDatacenterProxyExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("X-RapidAPI-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-RapidAPI-Key", "Bearer");

            var apiInstance = new DatacenterApi();
            var whitelistIp = whitelistIp_example;  // String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.
 (optional) 
            var countries = countries_example;  // String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU
 (optional) 

            try
            {
                // Obtain a new datacenter proxy
                GetProxySuccessfulOperation result = apiInstance.getDatacenterProxy(whitelistIp, countries);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatacenterApi.getDatacenterProxy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-RapidAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-RapidAPI-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiDatacenterApi();
$whitelistIp = whitelistIp_example; // String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

$countries = countries_example; // String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU


try {
    $result = $api_instance->getDatacenterProxy($whitelistIp, $countries);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DatacenterApi->getDatacenterProxy: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DatacenterApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-RapidAPI-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-RapidAPI-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DatacenterApi->new();
my $whitelistIp = whitelistIp_example; # String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

my $countries = countries_example; # String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU


eval { 
    my $result = $api_instance->getDatacenterProxy(whitelistIp => $whitelistIp, countries => $countries);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatacenterApi->getDatacenterProxy: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['X-RapidAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-RapidAPI-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DatacenterApi()
whitelistIp = whitelistIp_example # String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.
 (optional)
countries = countries_example # String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU
 (optional)

try: 
    # Obtain a new datacenter proxy
    api_response = api_instance.get_datacenter_proxy(whitelistIp=whitelistIp, countries=countries)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatacenterApi->getDatacenterProxy: %s\n" % e)

Parameters

Query parameters
Name Description
whitelist_ip
String
The proxy that this endpoint returns will allow connections from the source ip that is making this API call. Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist. The list of ips that the proxy has whitelisted is returned in the API response.
countries
String
List of countries, separate it by comma, that you would like the proxies to be located. Example: GB,US,PL,RU

Responses

Status: 200 - successful operation

Status: 403 - Forbidden


Residential

checkResidentialProxiesStatus

Check residential proxies service status

It returns the current status of the service, including the total number of residential proxies available and grouped by country.


/v2/residential/service_status

Usage and SDK Samples

curl -X GET\
-H "X-RapidAPI-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://ephemeral-proxies.p.rapidapi.com/v2/residential/service_status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResidentialApi;

import java.io.File;
import java.util.*;

public class ResidentialApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        ResidentialApi apiInstance = new ResidentialApi();
        try {
            ServiceStatus result = apiInstance.checkResidentialProxiesStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResidentialApi#checkResidentialProxiesStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResidentialApi;

public class ResidentialApiExample {

    public static void main(String[] args) {
        ResidentialApi apiInstance = new ResidentialApi();
        try {
            ServiceStatus result = apiInstance.checkResidentialProxiesStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResidentialApi#checkResidentialProxiesStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-RapidAPI-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-RapidAPI-Key"];

ResidentialApi *apiInstance = [[ResidentialApi alloc] init];

// Check residential proxies service status
[apiInstance checkResidentialProxiesStatusWithCompletionHandler: 
              ^(ServiceStatus output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EphemeralProxies = require('ephemeral_proxies');
var defaultClient = EphemeralProxies.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-RapidAPI-Key'] = "Token"

var api = new EphemeralProxies.ResidentialApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.checkResidentialProxiesStatus(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class checkResidentialProxiesStatusExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("X-RapidAPI-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-RapidAPI-Key", "Bearer");

            var apiInstance = new ResidentialApi();

            try
            {
                // Check residential proxies service status
                ServiceStatus result = apiInstance.checkResidentialProxiesStatus();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResidentialApi.checkResidentialProxiesStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-RapidAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-RapidAPI-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiResidentialApi();

try {
    $result = $api_instance->checkResidentialProxiesStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResidentialApi->checkResidentialProxiesStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResidentialApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-RapidAPI-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-RapidAPI-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ResidentialApi->new();

eval { 
    my $result = $api_instance->checkResidentialProxiesStatus();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResidentialApi->checkResidentialProxiesStatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['X-RapidAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-RapidAPI-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ResidentialApi()

try: 
    # Check residential proxies service status
    api_response = api_instance.check_residential_proxies_status()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResidentialApi->checkResidentialProxiesStatus: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation

Status: 403 - Forbidden


getResidentialProxy

Obtain a new residential proxy

The connection proxy details are `proxy.host` and `proxy.port` from the response fields. The proxy will allow connections from the same source IP as the one making this API call. Make use of the `whitelist_ip` parameter to allow an additional ip. Countries can be selected by using the `countries` parameter, otherwise the country is randomly selected. A list of countries is available on *Service Status* endpoint. The proxy is available for 30 mins.


/v2/residential/proxy

Usage and SDK Samples

curl -X GET\
-H "X-RapidAPI-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://ephemeral-proxies.p.rapidapi.com/v2/residential/proxy?whitelist_ip=&countries="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResidentialApi;

import java.io.File;
import java.util.*;

public class ResidentialApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        ResidentialApi apiInstance = new ResidentialApi();
        String whitelistIp = whitelistIp_example; // String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

        String countries = countries_example; // String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU

        try {
            GetProxySuccessfulOperation result = apiInstance.getResidentialProxy(whitelistIp, countries);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResidentialApi#getResidentialProxy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResidentialApi;

public class ResidentialApiExample {

    public static void main(String[] args) {
        ResidentialApi apiInstance = new ResidentialApi();
        String whitelistIp = whitelistIp_example; // String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

        String countries = countries_example; // String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU

        try {
            GetProxySuccessfulOperation result = apiInstance.getResidentialProxy(whitelistIp, countries);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResidentialApi#getResidentialProxy");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-RapidAPI-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-RapidAPI-Key"];
String *whitelistIp = whitelistIp_example; // The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.
 (optional)
String *countries = countries_example; // List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU
 (optional)

ResidentialApi *apiInstance = [[ResidentialApi alloc] init];

// Obtain a new residential proxy
[apiInstance getResidentialProxyWith:whitelistIp
    countries:countries
              completionHandler: ^(GetProxySuccessfulOperation output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EphemeralProxies = require('ephemeral_proxies');
var defaultClient = EphemeralProxies.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-RapidAPI-Key'] = "Token"

var api = new EphemeralProxies.ResidentialApi()
var opts = { 
  'whitelistIp': whitelistIp_example, // {{String}} The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

  'countries': countries_example // {{String}} List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getResidentialProxy(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getResidentialProxyExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("X-RapidAPI-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-RapidAPI-Key", "Bearer");

            var apiInstance = new ResidentialApi();
            var whitelistIp = whitelistIp_example;  // String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.
 (optional) 
            var countries = countries_example;  // String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU
 (optional) 

            try
            {
                // Obtain a new residential proxy
                GetProxySuccessfulOperation result = apiInstance.getResidentialProxy(whitelistIp, countries);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResidentialApi.getResidentialProxy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-RapidAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-RapidAPI-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiResidentialApi();
$whitelistIp = whitelistIp_example; // String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

$countries = countries_example; // String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU


try {
    $result = $api_instance->getResidentialProxy($whitelistIp, $countries);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResidentialApi->getResidentialProxy: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResidentialApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-RapidAPI-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-RapidAPI-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ResidentialApi->new();
my $whitelistIp = whitelistIp_example; # String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.

my $countries = countries_example; # String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU


eval { 
    my $result = $api_instance->getResidentialProxy(whitelistIp => $whitelistIp, countries => $countries);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResidentialApi->getResidentialProxy: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['X-RapidAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-RapidAPI-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ResidentialApi()
whitelistIp = whitelistIp_example # String | The proxy that this endpoint returns will allow connections from the source ip that is making this API call.
Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist.
The list of ips that the proxy has whitelisted is returned in the API response.
 (optional)
countries = countries_example # String | List of countries, separate it by comma, that you would like the proxies to be located.
Example: GB,US,PL,RU
 (optional)

try: 
    # Obtain a new residential proxy
    api_response = api_instance.get_residential_proxy(whitelistIp=whitelistIp, countries=countries)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResidentialApi->getResidentialProxy: %s\n" % e)

Parameters

Query parameters
Name Description
whitelist_ip
String
The proxy that this endpoint returns will allow connections from the source ip that is making this API call. Additionally, you can allow an extra ip to connect to the proxy by setting this parameter to the ip that you would like to whitelist. The list of ips that the proxy has whitelisted is returned in the API response.
countries
String
List of countries, separate it by comma, that you would like the proxies to be located. Example: GB,US,PL,RU

Responses

Status: 200 - successful operation

Status: 403 - Forbidden


getTrafficBalance

Get user's traffic balance

It returns the user's traffic balance for current monthly subscription.


/v2/residential/balance

Usage and SDK Samples

curl -X GET\
-H "X-RapidAPI-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://ephemeral-proxies.p.rapidapi.com/v2/residential/balance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResidentialApi;

import java.io.File;
import java.util.*;

public class ResidentialApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        ResidentialApi apiInstance = new ResidentialApi();
        try {
            TrafficBalance result = apiInstance.getTrafficBalance();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResidentialApi#getTrafficBalance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResidentialApi;

public class ResidentialApiExample {

    public static void main(String[] args) {
        ResidentialApi apiInstance = new ResidentialApi();
        try {
            TrafficBalance result = apiInstance.getTrafficBalance();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResidentialApi#getTrafficBalance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-RapidAPI-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-RapidAPI-Key"];

ResidentialApi *apiInstance = [[ResidentialApi alloc] init];

// Get user's traffic balance
[apiInstance getTrafficBalanceWithCompletionHandler: 
              ^(TrafficBalance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EphemeralProxies = require('ephemeral_proxies');
var defaultClient = EphemeralProxies.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-RapidAPI-Key'] = "Token"

var api = new EphemeralProxies.ResidentialApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTrafficBalance(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTrafficBalanceExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("X-RapidAPI-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-RapidAPI-Key", "Bearer");

            var apiInstance = new ResidentialApi();

            try
            {
                // Get user's traffic balance
                TrafficBalance result = apiInstance.getTrafficBalance();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResidentialApi.getTrafficBalance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-RapidAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-RapidAPI-Key', 'Bearer');

$api_instance = new Swagger\Client\ApiResidentialApi();

try {
    $result = $api_instance->getTrafficBalance();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResidentialApi->getTrafficBalance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResidentialApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-RapidAPI-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-RapidAPI-Key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ResidentialApi->new();

eval { 
    my $result = $api_instance->getTrafficBalance();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResidentialApi->getTrafficBalance: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['X-RapidAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-RapidAPI-Key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ResidentialApi()

try: 
    # Get user's traffic balance
    api_response = api_instance.get_traffic_balance()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResidentialApi->getTrafficBalance: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation

Status: 403 - Forbidden