to get a personalized navigation.
to get a personalized navigation.
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
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.
- 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.
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.
Hi Yildirim,
in postman it looks this way:
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
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.
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
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)
Copyright © 2022 Visma.com. All rights reserved.