Each request you send to the APIs requires an access token in the header. Access tokens are JWT tokens that you generate when you authenticate with the APIs. Access tokens expire 24 hours after being generated.

This guide provides examples of how to authenticate and get your access token. To use the code samples throughout the docs, you will need to provide an access token.

For more information about signing up and using, see the Get Started Guide.

This topic provides examples using curl, JavaScript, and Python. We also provide this request in our API Reference.

Generate an access token

To authenticate, you must have your app ID and secret from the Platform.

To generate an access token:


Try our interactive examples!

We provide interactive versions of these code samples: curl, Node.js, Python

To get started with our code samples, see Set Up Your Test Environment.


curl \
  --url \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "application",
    "appId": "'"$APP_ID"'",
    "appSecret": "'"$APP_SECRET"'"
import fetch from 'node-fetch';

const appId = '<APP_ID>';
const appSecret = '<APP_SECRET>';

const fetchResponse = await fetch('', {
  method: 'post',
  headers: {
    'Content-Type': "application/json",
  body: JSON.stringify({
    type: 'application',
    appId: appId,
    appSecret: appSecret

const responseBody = await fetchResponse.json();

import requests

app_id = "<APP_ID>"
app_secret = "<APP_SECRET>"

url = ""

headers = {
  "Content-Type": "application/json"

request_body = {
  "type": "application",
  "appId": app_id,
  "appSecret": app_secret

response =, headers=headers, json=request_body)