Skip to main content

Authentication

Getting Started

  1. Write an email to poa.support@cybrilla.com and register yourself as OAuth 2.0 client for partner authentication purposes. At present, access to POA additional APIs is provided only to AMC partners i.e. distributors and advisors.
  2. We will share the client_id and client_secret
  3. Use POST /v2/auth/cybrillarta/token endpoint and provide client_id and client_secret to generate token object.
  4. Use the generated token object's access_token to access additional POA APIs.
  5. Every token object will have an expiry time. Ensure that you are creating a new token object if the existing token object is expired.

Getting partner token

For partner tokens, we are using Client Credentials flow. This flow is recommended for server-side (aka confidential) client applications with no end-user, which normally describes server-to-server communication. The application needs to securely store its client ID and secret and pass them in exchange for an access token.

POST /v2/auth/cybrillarta/token

Headers

ParameterMandatoryDefaultValue
acceptyes-application/json
content-typeyes-application/x-www-form-urlencoded

Request Parameters

ParameterMandatoryDefaultDescription
client_idyes-client_id provided by POA
client_secretyes-client_secret provided by POA
grant_typeyes-Must be client_credentials

Sample Request

curl --location '{{base_url}}/poa/auth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<client_id>' \
--data-urlencode 'client_secret=<client_secret>' \
--data-urlencode 'grant_type=client_credentials'

Sample Response

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIyUVVoVl9aaGVyQmRHMjVQMl83cmdVaDYxcS1WXzZ0NzNmO",
"expires_in": 1800,
"refresh_expires_in": 0,
"token_type": "Bearer",
"not-before-policy": 0,
"scope": "partner"
}