Client Credentials Flow

The Client Credentials flow is used when making API requests directly from your application without user interaction. This flow is suitable for server-to-server integrations where you're accessing the API on behalf of your own service.

Implementation Guide

Requesting an Access Token

To obtain a service token, make a POST request to the token endpoint:

POST https://id.centraldispatch.com/connect/token

Required Request Parameters

FieldDescription
client_idAn ID that was assigned to your company by Central Dispatch.
client_secretA secret code that was assigned to your company by Central Dispatch.
grant_typeThis field should always contain the value client_credentials.

Example Request

curl -X POST https://id.centraldispatch.com/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "grant_type=client_credentials"

Response Format

Successful Response (200 OK)

{
    "access_token": "eyJhbGciOiJSUzI1...",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": "scope1 scope2..."
}

Using the Access Token

After obtaining the access token, include it in the Authorization header for all API requests:

curl -X GET https://api.centraldispatch.com/your-endpoint \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Important Notes

  • Keep your client credentials secure.
  • All requests must use HTTPS.
  • Required header: Content-Type: application/x-www-form-urlencoded.
  • Access tokens expire after the time specified in expires_in (in seconds).