to get a personalized navigation.
to get a personalized navigation.
Hello,
When making requests to this endpoint, I'm encountering a 401 error. I have tried different applications and grant types, and everything works fine up to the point of making the request (authentication, access_code, and everything else are successful).
Here’s what my request looks like:
curl --location 'https://business.visma.net/api/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {access_code}' \ --data '{"query":"query GetAvailableCompanies {\n availableCompanies {\n totalCount\n items {\n name\n vismaNetCompanyId\n }\n }\n}","variables":{}}'
Could you please help identify the issue?
my guess is that you are missing the correct scope in your access token request, or if you are using a service integration you are missing the -service in the api url.
the correct url for service integrations is https://business.visma.net/api/graphql-service
Yes, I know, but I need a different type of integration Business NXT GraphQL API. I am using scopes such as business-graphql-api:access-group-based and offline_access.
Then I suggest that you verify that your access token is valid on https://jwt.io
If I'm not mistaken, everything is fine with the token
Yes, the last thing that comes to mind then is the expiry. Remember that the token expires after 1 hour.
Yes, I generate the token right before the request using a refresh token.
Copyright © 2022 Visma.com. All rights reserved.