Forum Discussion

CatTech's avatar
CatTech
Member
5 months ago

Error using OAuth2 accessing Shared Sandbox

I'm having trouble getting a web site to work using OAuth2 to connect to a Shared Sandbox. This is using a new Application that I set up today on the Developer Dashboard. I can get a local site to work using an application I created last year. I tried migrating to a new public site with a new application (as it's a new redirect url) and it is failing. I've also tried a new application with a fresh key and secret to connect the old local site, and that too is failing.

 

I get to the screen on MYOB where I am to select a company file. MYOB Shared Sandbox 13 and MYOB Shared Sandbox 04 are shown. When I select one and click "Connect", I get the following error:

 

Something went wrong and we couldn't connect the app. Try again later.

 

The URL I am using to send the user to MYOB to authenticate is like this:

 

https://secure.myob.com/oauth2/account/authorize?client_id=...&redirect_uri=...&response_type=code&scope=sme-inventory sme-sales&prompt=consent

 

The client ID is the new application key, and the redirect uri matches the Redirect Uri in the application, except URL encoded.

 

I've made changes to the scope, it used to be CompanyFile which still works when connecting to the old application. From what I understand, any newly created applications must use the new scopes which I am doing. I've also read that administrator credentials must be used when opening the company file, however I don't seem to be getting to the stage where credentials are being entered.

 

Is there a known issue with the Sandbox accounts using newly created applications and the updated scope list?

1 Reply

  • Isaiah_C's avatar
    Isaiah_C
    MYOB Moderator
    5 months ago

    Hi CatTech,

     

    Hopefully one of the other devs in the community can jump in with an answer for you soon. If not, no stress, you can always reach out to our support team through developer.myob.com and they'll be able to give you a hand. 

     

    Regards,
    Sai