MYOBCommunity
Partner Zone
|
|
Partner Zone

API key is missing or inactiv

5 REPLIES
Contributing Partner natewallis
8 Posts
Contributing Partner
Australia
natewallis
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.

Contributing Partner natewallis
8 Posts
Contributing Partner
Australia
natewallis
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. 

 

MYOB Staff Jacob_S
13 Posts
MYOB Staff
New Zealand
Jacob_S
MYOB Staff

13Posts

2Kudos

1Solutions

Accepted Solution Solved Solution

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

Valued Partner Will_Focus
654 Posts
Valued Partner
New Zealand
Will_Focus
Valued Partner

654Posts

88Kudos

20Solutions

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.

Contributing Partner natewallis
8 Posts
Contributing Partner
Australia
natewallis
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.

Contributing Partner natewallis
8 Posts
Contributing Partner
Australia
natewallis
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..

 

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