Generate authentication token (legacy)

POST/auth/token

Generates a JWT token using Basic Authentication with API credential client ID and secret.

Provided for backward compatibility. New integrations should use POST /v2/auth/token instead.

RequiresBearerauthentication
Returns  

Successfully generated token

Response fields

tokenstringrequired

JWT token to be used for subsequent authenticated requests

POSTRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X POST "https://experiment.app.pheno.ml/auth/token" \
  -H "Authorization: Bearer $PHENOML_TOKEN"
200 OKExample Response
{
  "token": "<access_token>"
}