Go Back
13 October 13:10
1773
API

How to Use API?

1. Why do we use API?

API (Application Programming Interface) is a set of programming code, definitions and protocols that enables data transmission between one software product and another. API is designed to ensure an automatic and stable access to the ASocks proxy servers on a user’s side and is used for parsing of big data.

Using any software a user can connect to the ASocks service via API and get information about the user’s account, a list of IP-addresses contained in a Whitelist, and a list of available proxy-servers.

2. How to use ASocks API?

Log in the ASocks service and create ports.

Make sure, your balance is positive or top it up. In the My proxies tab select a location: country selection is mandatory, other parameters are optional. Set up the Proxy settings and Authorization method, and create an IP-address and a port.

2. Once the ports have been successfully created, move to the API tab on the left-side toolbar. The endpoints data presented in a figure below is used for the REST API platform to connect the proxy servers. The Copy icons are recommended to use for copying the required data.

The Proxy list link accumulates all proxy servers that you have ever been connected to, when using your account.

The User info link contains information on a user’s profile.

The IP Whitelist list contains information on the IP-address registered in the ASocks whitelist system.

Note: if you are not registered in the Whitelist system yet, add your IP in the ASocks system by clicking the IP Whitelist icon on the right top of the ASocks main page. Enter your IP-address in a corresponding field and click the Add button.

3. How to use the REST API platform?

Any REST API platform or a customized software solution can be used to connect to the ASocks proxy servers and to extract data. One of the REST API software examples that can be used is Postman, which is described in detail below:

Log in the Rest API software, which you are going to use for further connection to the proxy servers. If you use Postman, open the My Workspace tab and create a request using the right-side toolbar.

The Untitled Request window should open. Click the Authorization tab. Select Bearer token as the authorization type from the drop-down list. Enter the Token credentials that have been copied at the ASocks account into the corresponding field.

Select the Get option from the API methods list displayed in a drop-down box. Copy the required endpoint link to get API methods from the ASocks account as described above and paste it into the field. Click the Send button, and the requested data should display in the lower part of the screen immediately.

As an example, the Proxy list link has been copied and pasted in the endpoint field, and, correspondingly, the data on all proxy servers that have ever been used by a user is received (see a figure below).

If the User info link is entered into the endpoint box, the user profile information is displayed including: user ID and IP-address, registered email, current balance, user’s activity at the service, etc.

If the IP Whitelist link is entered in the endpoint field, the data on all IP-addresses registered in the ASocks whitelist system is displayed.

Once a response to the request has been received and the requested data has been displayed, the session is considered to be successful.

Postman or any other intermediate software can be used to get the data required for further application in a user’s software to connect to the ASocks proxy servers using API.


 

Written by Daria ASocks

Did this answer your question?