Authentication

Bearer auth (http)

Getting Started with Authentication

The Thankly Ads API uses OAuth2 Client Credentials Grant for authentication.

Step 1: Obtain Your Credentials

Contact your account manager to receive your clientId and clientSecret.

Step 2: Request an Access Token

Make a POST request to /auth/token with your credentials to receive an access token.

Example Request:

curl -X POST https://api.thankly.ai/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "your-client-id",
    "clientSecret": "your-client-secret"
  }'

Example Response:

{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "tokenType": "bearer",
  "expiresIn": 3600
}

Step 3: Use the Token

Include the access token in the Authorization header for all subsequent API requests:

Authorization: Bearer <your-access-token>