Skip to main content

Overview

ApifyCloud APIs use Bearer tokens. You can obtain a token using the OAuth client credentials flow.

Step 1: Prepare credentials

You need your client_id and client_secret.

Step 2: Request a token

Send a POST request to /oauth/token with the client_credentials grant type.
curl -X POST "https://api.apifycloud.io/api/v1/oauth/token" \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "client_credentials",
    "client_id": "your_client_id",
    "client_secret": "your_client_secret"
  }'

Step 3: Use the token

Add the token to the Authorization header in subsequent requests:
Authorization: Bearer {access_token}

Token lifetime

The response includes expires_in (in seconds). Request a new token when it expires.