Authentication
Get Access
We use Visma Connect for authentication. To get access, you need to register an application on the Visma Developer Portal by following the steps. When testing the API, please use Stage. When in production with real users, use Production.
-
Log in to Visma Developer Portal
- Stage: https://oauth.developers.stagaws.visma.com
- Production: https://oauth.developers.visma.com
-
Go to "My Applications" > "Add Application" > "Service (Machine-to-Machine)"
-
Fill in the required details and save your application. Note down the
client_id
. -
Publish the application.
-
Open the application and add a new integration.
-
Select the API you want to integrate with:
- Stage:
Machine Learning Factory API Stage
- Production:
Machine Learning Factory API Prod
- Stage:
-
Select the appropriate scope for your integration:
- Stage:
machine-learning-factory-api-stage:io
- Production:
machine-learning-factory-api-prod:io
- Stage:
-
Wait for the integration to be accepted. Feel free to contact the Inventory Optimization team to speed up the process.
-
Open the application, generate credentials, and securely store the
client_secret
.
Authenticate
To use the API you need an access token generated by Visma Connect's API. These have a lifetime of up to 60 minutes, depending on what you selected when setting up the application. To generate an access token, follow these steps:
-
Create a POST request to the Visma Connect API:
-
In the header of your request, specify
Content-Type: application/x-www-form-urlencoded
. -
In the request body, specify the following parameters:
- grant_type:
client_credentials
- client_id:
YOUR_CLIENT_ID_FROM_STEP_3
- scope:
YOUR_SCOPE_FROM_STEP_7
- client_secret:
YOUR_SECRET_FROM_STEP_9
- grant_type:
-
Send the request and retrieve the
access_token
from the response. -
Include the Authorization header with the
Bearer YOUR_ACCESS_TOKEN
for all your requests to the Inventory Optimization API. -
You are now ready to make requests to the Inventory Optimization API!
For more information about Visma Connect OAuth 2.0 Bearer Token Authentication, we refer to the Visma Connect Confluence.