Authentication
This page outlines how to authenticate with our service using OAuth 2.0 client credentials. Before starting, please note that "client credentials" is the only allowed authentication flow for our service, as all our services are meant to be implemented as machine-to-machine services.
The identity server used is a central authority for Volue called Volue Identity, if you are an existing partner using other Volue services please note that onboarding to Spark might require some additional configuration.
Requirements
If you haven't already gotten credentials, go to Spark Studio to do so.
Implementing authentication
To authenticate with our service using OAuth 2.0 client credentials, you will need to follow these steps:
- Request an access token from the Volue Identity authorization server by sending a POST request to the token endpoint with the following parameters:
- grant_type:
client_credentials
- client_id: the client identifier provided to you by us
- client_secret: the client secret provided to you by us
The response to this request will include an access token, which you will need to include in all subsequent requests to our service.
Here is an example of what the request would look like using curl:
curl --location 'https://auth.identity.volue.com/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<your_client_id>' \
--data-urlencode 'client_secret=<your_client_secret>'
- Include the access token in the Authorization header of all subsequent requests to our service using the Bearer scheme. For example:
Authorization: Bearer <access_token>
The access_token
is valid for an hour, so you will need to renew it before expiry.
Sample call
Here is an example of how to make a sample call to our service using the access token obtained in the previous step:
curl -H "Authorization: Bearer <access_token>" https://api.voluespark.com/smart/v1/prices/actual/NO1
This call will retrieve a list of the current Spot Prices in the NO1
price region. Make sure to replace <access_token>
with the actual access token obtained from the Volue Identity authorization server.
Next steps
- Visit the guides for examples on usage of specific endpoints
- Check out Swagger
- Check out our example application using this API