Documentation
Authentication
Aforza APIs use OAuth 2.0 for authentication. A private client_id and client_secret are required to request a token and will be provided by Aforza.
Important
Remember that your client_id and client_secret are secrets!
- Do not share them with others or expose them in any client-side code (browsers, apps).
- Secrets should be securely loaded from an environment variable or key management service on the server.
- Token requests and API requests should be made from a server-side backend application.
Request a token
Aforza's token endpoint is:
https://login.aforza.com/oauth2/default/v1/token
Example
Here is an example of how to request a token using curl:
Replace YOUR_CLIENT_ID, YOUR_CLIENT_SECRET and SCOPES with your actual values.
Code
Response
The token response is a JSON object in the following format:
Code
Use the token
All API requests to Aforza APIs must include an Authorization header with the value Bearer <access_token>.
Example
Here is an example of how to make a request to the Aforza Users API using curl:
Code