MYOBCommunity
Partner Zone
|
|
Partner Zone

JSON: Access denied

This thread is now closed to new comments.
Some of the links provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
2 REPLIES
API Evangelist KeranM
299 Posts
API Evangelist
Australia
KeranM
API Evangelist

299Posts

94Kudos

56Solutions

Re: JSON: Access denied

Hi there

Glad to hear you have it working.

The /company endpoint is read only - meaning you can only GET from that endpoint. However even if you POST to it it shouldn't return Unauthorized, it should return "HTTP/1.1 405 Method Not Allowed"

401 Unauthorized is usually the username/password combo not correct

Glad you've got it working. If you have any other trouble with it, you are welcome to reach out to developers@myob.com where the team can explore in more detail the issue with you

Cheers
Keran McKenzie
Futurist in residence @MYOB

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/

Twitter: @myobapi | @keranm
Experienced Partner JimineyCricket
12 Posts
Experienced Partner
JimineyCricket
Experienced Partner

12Posts

1Kudos

0Solutions

Re: JSON: Access denied

**bleep**... looks like this occurs only with the sandbox file where you can't post to /Company. Tested with /Contac and seems to return a response.

Thanks but it seems I've got it sorted.
Highlighted
Experienced Partner JimineyCricket
12 Posts
Experienced Partner
JimineyCricket
Experienced Partner

12Posts

1Kudos

0Solutions

JSON: Access denied

Hi,

I'm developing a little web tool to get company details from AccountRight v2. I can get passed oauth OK to get my access tokens.

 

I get to displaying a list of company files. I also prompt for a username and password for which I put in the header. The next call I'm making is just to get company details e.g /Company.

 

I currently only get the SandBox demo file in the list which is fine. With this list of files you get a URI.

e.g https://ar1.api.myob.com/accountright/09b2565f-e90f-4e07-83c4-890f9b322932

 

So I thought I had to use that and put /Company on the end. As I understand it, the demo file user/password is just Administrators with no password.

 

But when I make this call I get a HTTP "401 Unauthorized" and the JSON response is:

{
  "Message": "Access denied"
}

 

I'm not sure if that's telling me the username/password is incorrect or that I'm pointing to the wrong URI.

I believe it's the last piece of the puzzle so if anyone could shed some light on it would be great.

 

Thank you.

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post