Create a token for use across the API.
To obtain your Client ID and Client Secret, visit the API Settings page in your Serval dashboard.
This endpoint uses HTTP Basic Authentication where:
The Authorization header should contain Basic <base64-encoded-credentials>, where the credentials are client_id:client_secret encoded in base64.
curl -X POST https://public.api.serval.com/v2/auth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-u "your-client-id:your-client-secret" \
-d "grant_type=client_credentials"
Or with explicit Basic auth header:
# First, base64 encode your credentials: client_id:client_secret
# For example, if client_id=abc123 and client_secret=secret456
# echo -n "abc123:secret456" | base64
# Result: YWJjMTIzOnNlY3JldDQ1Ng==
curl -X POST https://public.api.serval.com/v2/auth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Basic YWJjMTIzOnNlY3JldDQ1Ng==" \
-d "grant_type=client_credentials"
Once you receive the access token, use it in subsequent API requests:
curl -X GET https://public.api.serval.com/v2/workflows \
-H "Authorization: Bearer your-access-token"
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
client_credentials