API key is missing or inactiv

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
natewallis
Contributing Partner
8 Posts
Contributing Partner
Australia
Contributing Partner

8Posts

0Kudos

0Solutions

Solved: Go to Solution

API key is missing or inactiv

Hi, 

 

I have managed to be able to retrieve my access token from the MYOB API, however when I make a simple call to the Sandbox commpany file, I receive the following response:

 

 

[29-Jan-2019 10:57:47 Australia/Sydney] {
    "Errors": [
      {
        "Name": "DeveloperInactive",
        "Message": "API key is missing or inactive",
        "AdditionalDetails": "Header: x-myobapi-key",
        "ErrorCode": null,
        "Severity": "Error",
        "LearnMore": "http://developer.myob.com/api/accountright/api-overview/error-messages/?label=developer_inactive&context=403"
      }
    ],
    "Information": "Warning, error messages have not been finalised in this release and may change"
}

 

 

I have verified that I am passing through the required headers.   To test the API has authenticated properly, I am doing a simple GET request to the following URL:

 

https://api.myob.com/accountright/Sale/Invoice/Item

 

I have created several API keys during testing the MYOB authentication - could this be the issue?

 

Do I have to do the "email developers@myob.com" dance to get this sorted?

 

Cheers..

 

5 REPLIES 5
natewallis
Contributing Partner
8 Posts
Contributing Partner
Australia
Contributing Partner

8Posts

0Kudos

0Solutions

Re: API key is missing or inactiv

Looks like I might be using the wrong URL for making API calls, I see references to using the company file GUID in various documentation, but no mention of it elsewhere....   Confusing.

Will_SolnX
Super Partner
763 Posts
Super Partner
New Zealand
Super Partner

763Posts

28Kudos

29Solutions

Re: API key is missing or inactiv

I'd recommend reading hte documentation here:

http://developer.myob.com/api/accountright/v2/company-files/

And verifying first using the Files endpoint:

http://localhost:8080/accountright/
http://[IP OF NETWORK COMPUTER]:8080/accountright/
https://api.myob.com/accountright/

Once you've got a company file ID, you should be able to construct the appropriate endpoints to call.   I find it easiest to start by bashing a localhosted version of AccountRight before bashing the Web API endpoints.

Jacob_S
15 Posts
Former Staff
New Zealand
Former Staff

15Posts

0Kudos

3Solutions

Accepted Solution Solved

Re: API key is missing or inactiv

Hi @natewallis,

 

Thanks for reaching out. We understand that you've reached out to us directly via the developer inbox. We will continue to assist you via that channel. 

 

Thanks,
Jacob
MYOB API Team

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/
MYOB API Support Centre - https://apisupport.myob.com

natewallis
Contributing Partner
8 Posts
Contributing Partner
Australia
Contributing Partner

8Posts

0Kudos

0Solutions

Re: API key is missing or inactiv

Thanks Will and Jacob. 

 

Turns out the API key was inactive, I am guessing this is because I created so many while developing the access_token storage code... 

 

So I can authenticate now.... 

 

I am also using the following for authenticating to the company file:

 

$username_password = base64_encode("Administrator:");

 

However when I hit the URL: 

https://api.myob.com/accountright/

All, I get back is:

 

?

 

Is that common?  I was expecting to get a list of the company files. 

 

natewallis
Contributing Partner
8 Posts
Contributing Partner
Australia
Contributing Partner

8Posts

0Kudos

0Solutions

Re: API key is missing or inactiv

Sorry, 

 

Just realised that was the compressed version of the response.. 

 

All sorted - thanks again for the quick response.

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