My Products
Help

Generate token

by David Tandberg-Johansen

Hi,

 

Can vi create a token with support for both Visma.net ERP SalesOrder API and Visma.net ERP Service API by setting the scope for both services?

 

Or do we have to generate separate tokens? 

2 REPLIES 2

by David Tandberg-Johansen

Thank you for your reply.

 

Accepted solution
Yıldırım
VISMA

by Yıldırım (Updated ‎14-12-2023 15:47 by Yıldırım VISMA )

Hi David, 

yes, you can create a single token for both services. 

1) Add relevant integrations to your application with the scopes. 

 Visma Developer Portal.jpg

2) Once approved, generate a token including all the scopes from both services in your request. 

 

E.g.

 

POST https://connect.visma.com/connect/token

 

 Request Headers:

 

Content-Type:application/x-www-form-urlencoded

 


Request body: x-www-form-urlencoded

client_id:yourClientID
client_secret:yourClientSecret
grant_type:client_credentials
scope:visma.net.erp.salesorder:read visma.net.erp.salesorder:write vismanet_erp_service_api:create vismanet_erp_service_api:read vismanet_erp_service_api:delete vismanet_erp_service_api:update
tenant_id:yourTenantID

 

So that, this token can be used for both resources.

  1. https://integration.visma.net/API-index/
  2. https://salesorder.visma.net/swagger/index.html