Skip to main content

Authentication

Learn how to authenticate your requests to the Calry API.

When making requests to the Calry API, you will need to pass proper authentication parameters so that you can identify yourself as an authorized user.

There are primary authentication protocols we will explore below:

  1. Calry API Key
  2. Calry Workspace Id
  3. Linked Account Identifier

The credentials you retrieve from these protocols need to be included in the headers for every request you send to the Calry API.

Calry API Authentication

Calry API Key​

For any request you make when communicating with the Calry API, you will need an API key to authenticate yourself as an authorized user. You should have saved your access key after creating it in Calry, but if you no longer have it, you can regenerate your Production Access Key in API Keys section.

If you’re writing your own requests, add your API key with a "Bearer " prefix as a header called Authorization to authorize your Calry API requests. This header must be included in every request in this format:

  1. Go to Settings page from the left bar.
  2. Choose API Keys from the above tabs.
  3. Give the key a name, expiry time and click on generate.
  4. Done!!. Copy the token and use in as a Bearer token while calling the APIs.
'Authorization': 'Bearer YOUR_API_KEY'

Calry Workspace Id​

Copy the Calry workspace Id under Settings -> Accounts section.

'workspaceId': '7246e4f5-d8f2-4c01-abb7-753b9df2d31f'

Linked Account Identifier​

When sending requests to the Calry API regarding your end users’ data, you’ll only be authorized to access or manipulate that users’ data if they’ve gone through Calry Link and you’ve successfully stored their account_identifier for use with these requests.

The account_identifier also serves to signify the particular integration you wish to interact with. You can find your account_identifier at the right of each Linked Account's page under the end user organization information.

If you’re writing your own requests, add your user’s account_identifier as a header called integrationAccountId to authorize your Calry API requests. The account_identifier must be included in the headers for every request in this format:

Below is the example of the integrationAccountId for the end user account.

Linked Account

'integrationAccountId': 'END_USER_ACCOUNT_IDENTIFIER'