Tradesolution protect its APIs with OAUTH2 using bearer tokens/access tokens. If you need your systems to talk to ours, please contact us at [email protected] to get clientId and secret.
To get a bearer token that can be used against Tradesolution APIs, your system must do a POST call like this:
POST https://login.microsoftonline.com/trades.no/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
client_id=<insert_client_id>&client_secret=<insert_secret>&grant_type=client_credentials&scope=https://trades.no/TradesolutionApi/.default
{
"access_token": "eyJhbG*****",
"expires_in": 36000,
"token_type": "Bearer",
"ext_expires_in": 36000
}
The token is valid for 10 hours
Add the access_token to all request headers going to our APIs
Authorization: Bearer <access_token>