Quickstart
Let's get you started with requesting access to the API through Visma Developer Portal.
TimeDetect Tutorial
For a guided introduction and to simplify following the documentation, explore the Getting Started with TD tutorial in our boilerplate repository.
You can also get started with our Postman Template.
Getting API 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:td
- Production:
machine-learning-factory-api-prod:td
- Stage:
-
Wait for the integration to be accepted. Feel free to contact the Time Detect team to speed up the process.
-
Open the application, generate credentials, and securely store the
client_secret
.
Base URL and API Scope
Environment URLs
- Production:
https://api.machine-learning-factory.visma.com/td
- Stage:
https://api.machine-learning-factory.stage.visma.com/td
- Test:
https://api.machine-learning-factory.test.visma.com/td
Integration Scope
- API Scope: The API integration scope for the TimeDetect API is "td". This is needed when requesting access to the API.
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:
-
To authenticate, create a
POST
request to the Visma Connect API URL, which is: -
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 Time Detect API. -
You are now ready to make requests to the Time Detect API!
For more information about Visma Connect OAuth 2.0 Bearer Token Authentication, we refer to the Visma Connect Confluence.