401 Unauthorised Error MYOB Business Plus
Trying to integrate an API solution and having trouble doing the very basics with MYOB API.
In summary:
- Purchased a subscription of MYOB Business Pro to test
- Obtained a developer API Key for our application
- Successfully can use Oauth to get the code
- Successfully use https://secure.myob.com/oauth2/v1/authorize to get the token and refresh token
- Successfully use https://secure.myob.com/oauth2/v1/authorize to get a refresh token
However when we try to do the following basic call to get the companyFiles connected to the user using api:
https://api.myob.com/accountright
We get a 401 Unauthorized.
Using postman to make the call, here are the snapshots. Tried both with and without 'Bearer'. Also tried including property x-myobapi-cftoken, with password Based64(Adminstrator:) => QWRtaW5zdHJhdG9yOg==
Still get the same error. Only had the MYOB subscription account for 7 days not sure if this is the problem?
Also is this the correct endpoint for MYOB Business plus? https://api.myob.com/accountright
Also the user is the owner of the CompanyFile + also connected to other profiles. I have also tried registering another email as a user with File access but still get the same error.
Appreciate if we can get some help on this. Have also raised ticket with MYOB but not got a response yet.
Issue resolved, I had passed the auth paramaters in the body not the header. Now working