Andrew Lockwood
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Downloads
Gallery
Posts posted by Andrew Lockwood
-
-
I have managed to request an authorization code, and convert it into an access token.
However, when I then make a request using the access token, I get an "Unauthorised Access" error, the JSON response being:-
[{"$severity":"error","$dataCode":"AccessTokenVerificationError","$message":"Access token is invalid (JWT malformed or missing).","$source":"Authorization"}]
I am not doing any encoding or decoding. I am simply using the access token as it is presented to me.
Can anyone tell me what is going wrong?
-
On 1/25/2022 at 10:51 AM, Joshua Press said:
Just fixed the problem.
The problem was that I was using the code exactly as it came from the URL (encoded): GB%2Fxxxxxxxxxxxxxxx and that does not work. I've decoded the code, becoming something like: GB/xxxxxxxxxxxx and now it works.
An easy fix actually, but I've overlooked it. Since this seems to be an often asked question, I hope this may help someone save a few hours.Thanks!!! It is a pity the official documentation cannot include such a simple, but critical bit of information.
Cannot make a successful request - JWT error
in Support
Posted
I am trying to send a GET request to https://api.accounting.sage.com/v3.1/contact_allocations to return all contact allocations.
The only header I am adding is an authorization header containing the access token in the form "Bearer xxx...xxx"