Authentication
The API calls in this documentation require a Bearer Authentication token. This token is a time-limited key that must be included in the header of every request to a protected endpoint.
To get this token, you'll first make a request to our Authentication API using your
unique client_id and client_secret. This process follows the OAuth 2.0 Client Credentials
flow, which is a standard and secure way for your application to authenticate itself.
Environments
The authentication process is specific to the environment you are working in. Be sure to
use the correct connect/token address.
| Environment | Authentication API address |
|---|---|
| Test | https://authdemo.svea.com/connect/token |
| Production | https://auth.svea.com/connect/token |
Example Request
Here's an example cURL request to fetch your authentication token. Remember to replace
the placeholders MY_client_id and MY_client_secret with your actual credentials.
curl --location "https://authdemo.svea.com/connect/token"
--header "Content-Type: application/x-www-form-urlencoded"
--data-urlencode "grant_type=client_credentials"
--data-urlencode "client_id=MY_client_id"
--data-urlencode "client_secret=MY_client_secret"
--data-urlencode "scope=salesfinance.order"
--data-urlencode "response_type=token"
Example Response
A successful request will return a JSON object with your access_token.
{
"access_token":"...",
"expires_in":3600,
"token_type":"Bearer",
"scope":"salesfinance.order"
}