Authenticating on the API
Authenticate Apara API requests by creating a Basic Authentication header from your API credentials.
Step 1: Get API Credentials (From Apara Portal)
-
Sign in to the Apara Portal.
-
Copy your USERNAME.
-
Copy your PASSWORD.
These credentials are required for every authenticated API request.
Step 2: Authenticate a request
-
Combine your credentials in the format USERNAME:PASSWORD.
Example:
aparaUser:aparaPass -
Encode the combined string in Base64.
Using:
//javascript const credentials = "aparaUser:aparaPass"; const encoded = Buffer.from(credentials).toString("base64"); console.log(encoded);//python import base64 credentials = "aparaUser:aparaPass" encoded = base64.b64encode(credentials.encode()).decode() print(encoded)Expected output: YXBhcmFVc2VyOmFwYXJhUGFzcw==
-
Add the encoded value to the Authorization header with the Basic prefix.
Authorization: Basic YXBhcmFVc2VyOmFwYXJhUGFzcw== -
Send your API request with the Authorization header.
Example:
curl --location 'https://sandbox-api.aparatech.io/v3/config/supported-currencies?direction=deposit&userType=individual&limit=100&page=1' \ --header 'accept: application/json' \ --header 'mid: {{mid}}' \ --header 'Authorization: Basic {{token}}'
The response depends on the endpoint you call, but every authenticated request must include the same Basic Authentication header format.
Was this page helpful?