When making calls to the MYOB API you will need to ensure you have the correct authorisation headers. One of these of course is
Authorizaion: "Bearer {{access_token}}
If you find yourself getting the following error:
{ "Name": "OAuthTokenIsInvalid", "Message": "The supplied OAuth token (Bearer) is not valid", "AdditionalDetails": "Header", "ErrorCode": 31001, "Severity": "Error", "LearnMore": null }
You can try the following things to correct this:
- Check you have not URL Encoded the access_token
- Check the token is exactly as provided to you and not missing any extra characters
- Check that you used the correct scope when asking for the token
- CompanyFile - for AccountRight
- la.global - for Essentials
- CompanyFile la.global - for both
- You can not use an Essentials requested token to talk to AccountRight
- Make sure your API Key matches the key the token was generated for
- If you have switched keys you'll need to reauthorise
- Ensure any new keys are active
If you have tried these items and are still having trouble, please submit a support request.
Comments
0 comments
Please sign in to leave a comment.