API Key and Client ID

Request a JWT with your API key and Account Id, then send the token as Bearer.

Your API key and Account Id are how you request a JWT. After that, API calls use the token, not these two values.

Where to find them

Open API Keys in the Okoora Platform.

  • API key, sent as X-Api-Key
  • Account Id, sent as X-Client-Id

Send these headers only on the token request. Use a separate key for Demo and for Production.

Request a token

POST /api/v1/Authentication/Authenticate

  • Demo: https://api-demo.okoora.com
  • Production: https://api.okoora.com
curl --request POST \
  --url https://api-demo.okoora.com/api/v1/Authentication/Authenticate \
  --header "X-Api-Key: YOUR_API_KEY" \
  --header "X-Client-Id: YOUR_ACCOUNT_ID" \
  --header "Accept: application/json"
{ "accessToken": "YOUR_ACCESS_TOKEN" }

The token lasts 15 minutes in Production and 60 minutes in Demo. Call Authenticate again and replace the token you send. Field details are on Authenticate.

Call an endpoint

curl --request GET \
  --url https://api-demo.okoora.com/api/v1/Balances \
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  --header "Accept: application/json"

If a call is rejected

StatusWhat it meansWhat to do
401The token is missing, wrong, or expired. Or the API key or Account Id was wrong when you requested the token.Request a new token. Check the Authorization: Bearer header.
403The token is valid, and this account cannot use that action.Use the matching environment, and confirm the account can use that feature.

Did this page help you?