MYOBCommunity
Partner Zone
|
|
Partner Zone

(401) Unauthorized & Access denied

4 REPLIES
Partner Mark_Developer
3 Posts
Partner
Mark_Developer

3Posts

0Kudos

0Solutions

Re: (401) Unauthorized & Access denied

Hi Jack,

 

Unfortunately, it's happening again?! I will send another request to have the Administrator account reset.

 

Regards,

 

Mark

MYOB Staff Post DeveloperJack
141 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

141Posts

31Kudos

21Solutions

Re: (401) Unauthorized & Access denied

No worries @Mark_Developer,

It generally shouldn't happen but it is possible because the sandboxes are shared. The developers@myob.com can help you out should it occur again.

Cheers!

Jack

Jack Skinner
MYOBapi Evangelist

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

3Posts

0Kudos

0Solutions

Re: (401) Unauthorized & Access denied

Thanks Jack (@DeveloperJack),

 

I can confirm I can access other data using the Sample C# App - I will test using my solution later today.

 

Furthermore, how do I avoid this from happening again?

 

Regards,

 

Mark

MYOB Staff Post DeveloperJack
141 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

141Posts

31Kudos

21Solutions

Re: (401) Unauthorized & Access denied

Hi there @Mark_Developer,

It sounds like we might need to get a password reset done - can I trouble you to drop us a note to developers@myob.com with the company file ID that you're connecting to and we'll get that reset for you.

Cheers!

Jack

Jack Skinner
MYOBapi Evangelist

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

3Posts

0Kudos

0Solutions

(401) Unauthorized & Access denied

Hi there,

 

Why can't I access any data related to the sandbox company file from the MYOB AccounRight Live API anymore?

 

Last week, I could add/update/delete data but now, call an API method like:

MYOB.AccountRight.SDK.Services.Contact.CustomerService.GetRange

; returns the 'The remote server returned an error: (401) Unauthorized.' and 'Access denied' error messages?! Also, the same problem occurs using the Sample C# App (Using SDK).

 

I can confirm the following:
- my solution accesses the API via the cloud under the 'Open Access' Developer Program
- my stored OAuth token is set to expire in the future; when it does expire, I refresh it using

MYOB.AccountRight.SDK.Services.OAuthService.RenewTokens

- my sandbox company file is retrieved using 

MYOB.AccountRight.SDK.Services.CompanyFileService.GetRange

- my CompanyFileCredentials used are: Administrator/{No password}
- my code snippet that calls the API is:

var companyFile = GetCompanyFile();
var customerService = new CustomerService(_apiConfiguration, null, _oAuthKeyService);
var customers = customerService.GetRange(companyFile, null, _companyFileCredentials);

- my Developer Dashboard only has 2 apps registered

- my Developer Dashboard says my usage (last 24 hr) is less than 100 which is well under the Quota Limit of 5000 per day.

 

My assumptions are:
- the sandbox company file, accounts, etc are shared by other developers
- the Administrator account has a password now - this post lead me to think so: API Sandbox Demo 17 - Administrator login incorrect

 

Any help will be greatly appreciated.

 

Regards,

 

Mark

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