AuthenticationIssue a machine access token

Issue a machine access token

Exchanges API credentials for a Bearer JWT using the OAuth 2.0 client credentials grant.

Send application/json (not application/x-www-form-urlencoded). Tokens expire after 3600 seconds. There is no refresh token. Exchange credentials again to obtain a new token. Several tokens may be valid until each expires. Revoking a credential invalidates outstanding tokens. This response is the OAuth token object — it does not use the { data, meta } envelope.

curl -X POST "https://api.scrut.io/oauth/token" \
  -H "Content-Type: application/json" \
  -d '{
  "grant_type": "client_credentials",
  "client_id": "550e8400-e29b-41d4-a716-446655440000",
  "client_secret": "your-client-secret"
}'
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXAiOiJtYWNoaW5lX2FjY2VzcyIsInN1YiI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCJ9.dummy-signature-for-documentation-only",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "evidence:read, evidence:write, policy:read"
}
POST
/oauth/token
POST
Base URLstring

Target server for requests. Edit to use your own host.

Content-Typestring
Required

The media type of the request body

Options: application/json
grant_typestring
Required

Only the client credentials grant is supported.

Options: client_credentials
client_idstring
Required

UUID v4 from Settings → Developer Console.

Format: uuid
client_secretstring
Required

Secret shown once at credential creation.

Request Preview
Response

Response will appear here after sending the request

Body

application/json
grant_typestring
Required

Only the client credentials grant is supported.

Allowed values:client_credentials
client_idstring
Required

UUID v4 from Settings → Developer Console.

Example:
550e8400-e29b-41d4-a716-446655440000
client_secretstring
Required

Secret shown once at credential creation.

Example:
your-client-secret

Responses

access_tokenstring
Required

RS256 machine JWT. Send as Authorization: Bearer $SCRUT_ACCESS_TOKEN.

token_typestring
Required
Allowed values:Bearer
expires_ininteger
Required

Lifetime in seconds. There is no refresh token — exchange credentials again.

scopestring
Required

Comma-separated scopes granted with this access token. A write scope includes read access for the same resource (for example, evidence:write includes evidence:read).