Authentication
Last updated
Last updated
This guide walks users through how to use authenticate requests using the Alluvial APIs.
Below is a ladder diagram showing the flow to create an access token.
This flow involves 3 parties:
Platform Server: the client looking to access the Alluvial API and which has previously been given a Client ID and Client Secret credentials.
Alluvial Authorization Server: responsible for validating credentials and generating JWT Access Token.
Alluvial API: the target resource to be accessed.
To obtain a Client ID and Client Secret reach out to your Alluvial representative.
To obtain an access token, use the a request below using your client id and secret.
Request:
Make sure you are using the correct audience URL. Staging: https://api.staging.alluvial.finance Production: https://api.alluvial.finance
Response:
Access Token should be reused for every request until it expires, in which case they should go through the Client Credential Flow again to obtain a fresh Access Token.
To use the access token, pass it via the HTTP header Authorization: Bearer
If you receive a 2xx response, you are now able to make fully authenticated requests.
If you receive a 4xx response, check if your access token is expired.
You are now ready to make requests! Please check out our guides on staking and redemptions.