3

When I make a request using Postman to query the Visma Net API /account endpoint, I get a HTTP 400 Bad Request error:

{
  "ExceptionType": "IPPException",
  "ExceptionMessage": "",
  "ExceptionFaultCode": "12002",
  "ExceptionMessageID": "12002_12002_some-guid",
  "ExceptionDetails": ""
}

The request I send is to:

https://integration.visma.net/API/controller/api/v1/account?active=true

I put the received Bearer token from the OAuth authentication step in the Authorization header.

Jham
  • 195
  • 12

1 Answers1

3

A 12002 code is returned by Visma.net for at least the following cases:

  • The company ID is not set (in Swagger site: enter the ID in top right corner, retrieve list of companies available to you using Context in list).
  • The user is not authenticated on the company ID provided in the HTTP header.

To use swagger: https://integration.visma.net/API-index/.

The ipp-company-id in the top right corner of the visma.net API swagger site can also manually be handled.

Besides the Authorization header, you set two headers:

  • ipp-company-id: the company id
  • ipp-application-type: always "Visma.net Financials"

Best is to enter into a partner agreement with Visma. They have a lot of additional information and training videos. Note that implicit grant is not supported, only code grant flow, so there are some security risks involved when running on untrusted devices. Best is to acquire a client ID per untrusted environment or use visma.net APIs only from your own trusted environment.

Guido Leenders
  • 4,232
  • 1
  • 23
  • 43