Authentication API

This page shows the process for creating an access token.

  1. When onboarding with Alluvial, you will receive API credentials. These include a client_id and client_secret.

  2. After receiving your credentials use the curl request below, updating the client_id and client_secret with your specific credentials.

Staging

curl -X 'POST' \
  'https://auth.staging.alluvial.finance/' \
  -H 'content-type: application/json' \
  -d '{
    "audience": "https://api.staging.alluvial.finance",
  "grant_type": "client_credentials",
  "client_id": "<YOUR_CLIENT_ID>",
  "client_secret": "<YOUR_CLIENT_SECRET>"
}'

Response

{
  "access_token": "eyJz93a...k4laUZw",
  "scope": "read:eth-oracle...read:eth-operators",
  "expires_in": 86400,
  "token_type": "Bearer"
}

Production

Request

curl -X 'POST' \
  'https://auth.alluvial.finance/oauth/token' \
  -H 'content-type: application/json' \
  -d '{
    "audience": "https://api.alluvial.finance",
  "grant_type": "client_credentials",
  "client_id": "<YOUR_CLIENT_ID>",
  "client_secret": "<YOUR_CLIENT_SECRET>"
}'

Response

{
  "access_token": "eyJz93a...k4laUWw",
  "scope": "read:eth-oracle...read:eth-operators",
  "expires_in": 86400,
  "token_type": "Bearer"
}

Last updated