Request an access token

POST/v2/auth/token

OAuth 2.0 client credentials token endpoint (RFC 6749 §4.4). Accepts client_id and client_secret in the request body (JSON or form-encoded) or via Basic Auth header (RFC 6749 §2.3.1), and returns an access token with token expiration information.

RequiresBearerauthentication

Body parameters

grant_typestringoptional

Must be "client_credentials" if provided

client_idstringoptional

The client ID (credential username)

client_secretstringoptional

The client secret (credential password)

Returns  

Successfully generated token

Response fields

access_tokenstringrequired

JWT access token for subsequent authenticated requests

token_typestringrequired

Token type (always "Bearer")

expires_inintegerrequired

Token lifetime in seconds

POSTRequest
curl -X POST 'https://experiment.app.pheno.ml/v2/auth/token' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "client_id": "your_client_id",
  "client_secret": "your_client_secret"
}'
200 OKResponse
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 172800
}