My Products
Help
Florian Haase
PARTNER

Still some 403 errors

by Florian Haase

Hi

 

there are still problems with this 403 error. This time regarding creating and printing Credit Notes:
GET      /controller/api/v1/customerCreditNote/{creditNoteNumber}/print
POST     /controller/api/v2/customerCreditNote

When creating invoices or credit notes and opening them as pdf files we get error messages.
The HTTP response for every callout returns: "status code 403".

 

CompanyID: 747313

 

 

Florian

 

 

7 REPLIES 7
Yıldırım
VISMA

by Yıldırım

Hi Florian, 

we need more information to be able to clarify whether this is connected to the previous case. 


- Do you have any exception message ? 

- Is the error company specific ? (Please also try on another company and inform us)

- Have you checked the access roles of the user that the token generated with  ? 

 

Thanks.

Florian Haase
PARTNER

by Florian Haase

- Do you have any exception?

We only have this status code:

11:20:51.0 (39088503)|CALLOUT_REQUEST|[24]|System.HttpRequest[Endpoint=https://integration.visma.net/API/controller/api/v1/customerCreditNote/402831/print, Method=GET]

11:20:51.0 (356186286)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:512

11:20:51.0 (371086413)|CALLOUT_RESPONSE|[24]|System.HttpResponse[Status=Forbidden, StatusCode=403]

 

- Is the error company specific ? (Please also try on another company and inform us)

We don't have another company to check it out. 

 

- Have you checked the access roles of the user that the token generated with  ?

We haven't change anything with our roles or a token.

We use the same token all the time and previously these endpoints worked fine with the current token.

 

 

Yıldırım
VISMA

by Yıldırım (Updated ‎07-09-2022 16:10 by Yıldırım VISMA )

Thanks for the information.  Could you also try the same operation via Postman ?

We're unable to reproduce the issue, however we'll look into that and get back to you soon.

Florian Haase
PARTNER

by Florian Haase

Hi Yildirim,

 

in postman it looks this way:

FlorianHaase_0-1662631047257.png

I wonder if there has changed something about the user-roles in admin - I will check this at the same time and we try to do the same operation in the UI

Yıldırım
VISMA

by Yıldırım

Hi Florian, 

 

Apparently, the roles of the token-generated user have been changed, therefore you're receiving 403 - CompanyInContext error. So we recommend checking the User Roles via Admin panel and granting access to the company. (Guide: Connecting your Visma.Net Financials company to the API)

We'd also recommend logging HttpClient.Response.Content in your integration to be able to pinpoint the issue with the exception message.

 

Florian Haase
PARTNER

by Florian Haase

Hi Yildirim,

 

sorry that this takes a bit of time. But now I have found out that the problem could be, that the user which is connected to the used token has been deleted. That was not us who generated the token and we are not using it either. Therefore it was difficult to understand what happened here. In addition I got feedback that only calls to to the print endpoint are not working - but now I guess that the whole integration stopped. We generate a new token on a new user and check if this solves the problem.

 

Florian

 

 

Yıldırım
VISMA

by Yıldırım

Hi Florian, 

 

please make sure that the new user have the mentioned roles before generating the token (Connecting your Visma.Net Financials company to the API)