This page describes how to authenticate your requests to Perculus API
Bearer token must be added as Authentication key in the βHEADERβ field for all requests to be sent to PerculusAPI.
Below are the parameters required to create ACCESS_TOKEN. This is the token we will use as the Bearer:
DOMAIN: The subdomain of Perculus that is used to access your Panel
ACCESS_KEY: The email address of the user we created for the API
SECRET_KEY: The password of the user we created for the API
ACCOUNT_ID: The GUID of your account
For ACCOUNT_ID data, you can contact your customer success manager and get the βACCOUNT_IDβ belonging to your account.
All of these data can be collected from your environment variables as well. Just suffix each variable with PERCULUS_ , and SDKs will try to collect those information.
Use the following example to access ACCESS_TOKEN data.
After sending the following CURL request, ACCESS_TOKEN will be returned as the response.
The SDK should be imported into the appropriate code block after ensuring that the SDK is installed:
from perculus_sdk.client import APIClient
Complete the authentication process using the 'set_credentials' method with your parameters.
# API client
client = APIClient()
# Set your domain
client.set_domain("<DOMAIN>")
# Set your credentials
client.set_credentials(
access_key="<EMAIL>",
secret_key="<PASSWORD>",
account_id="<ACCOUNT_ID>"
)
After this step, you can use the other methods as you wish without having to authorize each service in the SDK over and over again.
// ASAP :)
The Node.js SDK must be installed first:
npm install perculus-sdk
The SDK should be imported into the appropriate code block after ensuring that the SDK is installed:
import APIClient from "perculus-sdk"
Complete the authentication process using the 'setCredentials' method with your parameters.
// API client
const client = new APIClient()
// Set your domain
client.setDomain("<DOMAIN>")
// Set your credentials
client.setCredentials(
access_key="<EMAIL>",
secret_key="<PASSWORD>",
account_id="<ACCOUNT_ID>"
)
After this step, you can use the other methods as you wish without having to authorize each service in the SDK over and over again.
// ASAP :)
The ACCESS_TOKEN will be required for all future services. Therefore, remember to keep your ACCESS_TOKEN in a safe place.