🔐Authorization

This page describes how to authenticate your requests to Groups 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

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.

curl --location --request POST 'https://<DOMAIN>/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=<EMAIL>' \
--data-urlencode 'password=<PASSWORD>' \
--data-urlencode 'client_id=api' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'account_id=<ACCOUNT_ID>'

Below you can see a sample response model:

{
    "access_token": "<ACCESS_TOKEN>",
    "expires_in": 36000,
    "token_type": "Bearer",
    "scope": "api"
}

Last updated

Was this helpful?