Using my.MYOB account instead of Username / Password in authentication header

2 REPLIES
Partner RDAtech
2 Posts
Partner
RDAtech
Partner

2Posts

0Kudos

0Solutions

Re: Using my.MYOB account instead of Username / Password in authentication header

Thank you Jack.

 

It would be good for MYOB to update the API Authentication page (http://developer.myob.com/api/accountright/api-overview/authentication/) to state that if user access in company file is configured to use my.MYOB then the x-myobapi-cftoken header is not required, and that user access can be confirmed using CurrentUser. It currently states that this header is required.

 

Cheers

MYOB Staff Post DeveloperJack
90 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

90Posts

26Kudos

13Solutions

Accepted Solution Solved Solution

Re: Using my.MYOB account instead of Username / Password in authentication header

Hi there @RDAtech,

You should never need to prompt a client for their my.myob credentials.

 

The second layer of authentication with AccountRight Live is because each file also maintains its own, separate set of users. In some cases, clients have linked their my.myob login with a per-file user. (Step 5 of Open a company file). In these instances you don't need to provide a cftoken.

 

The recommended process is to:

 - complete Oauth

 - Select a file

 - Query the /CurrentUser endpoint

 

If you get an error, you'll probably need the cftoken per-file credentials to connect. If not, the response from /CurrentUser will tell you which resources and actions you can complete within that file for the given credentials you've provided.

 

Hope this helps!

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/
Highlighted
Partner RDAtech
2 Posts
Partner
RDAtech
Partner

2Posts

0Kudos

0Solutions

Solved: Go to Solution

Using my.MYOB account instead of Username / Password in authentication header

I have implemented local and cloud access to the API in VBA using OAuth, as described in http://developer.myob.com/api/accountright/api-overview/authentication/. At the bottom of the page the note states: "Even though OAuth authentication takes care of logging in to the user’s my.MYOB account, the user will still need to enter a company file user ID and password before they can access individual company files linked to their my.MYOB account."

 

The company file has user access configured for users to sign in with a my.MYOB account. Do I need to get the user's my.MYOB username and password to use for the company file access, or is their some way to reuse the token I have received through the OAuth authentication?

 

If I have to get their my.MYOB details then it breaks the OAuth model, but I cannot find any instructions on using a company file authentication other than username/password.

 

Need to have solution implemented before end of month invoicing, so any simple quick responses (even "You have to use username/password") would be appreciated.

 

Thanks in advance

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