post https://api-prod-us-west-2.solinkcloud.com/v2/oauth/token
Use your authentication credentials, including x-api-key, client_id, and client_secret, to create a bearer token using the following endpoint: /v2/oauth/token
Sample Request
curl --request POST \
--url https://api-prod-us-west-2.solinkcloud.com/v2/oauth/token \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '
{
"audience": "https://prod.solinkcloud.com/",
"client_id": "{CLIENT_ID}",
"client_secret": "{CLIENT_SECRET}"
}
'
Sample Response
{
"access_token": "{ACCESS_TOKEN}",
"expires_in": 14399
}
Using Access Tokens
To use your token, use the bearer authentication format. Send the access_token
in the Authorization header with the x-api-key
when making requests as per the example below.
curl --request GET \
--url https://api-prod-us-west-2.solinkcloud.com/v2/reports \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}'
Access Token Expiration
Once a token is created, you'll be able to use the bearer tokens for 4 hours before they expire. Make sure to use the expires_in
field from the response to manage token renewal effectively.