AccountRight API must receive credentials for specific company file ?

4 REPLIES
MYOB Staff Post DeveloperJack
65 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

65Posts

21Kudos

7Solutions

Re: AccountRight API must receive credentials for specific company file ?

Hi there @GuyCrsk@Mike_James,

 

There are two layers of authentication in AccountRight Live online API's:

  1. Oauth - used to access the ARL API 
  2. Company File credentials (optional) - if the client has setup per-file credentials that aren't linked to their online user.

 

Users can link their file login to their my.myob login (step 5 when opening a company file). If your client/user has not linked their credentials then yes, you'll need to also provide that credential as the x-myobapi-cftoken header.

 

The best way to check what access you have (and determine if you need a cftoken value) is to first call the /CurrentUser endpoint within a file and then establish if you have access to the resources that your application needs.

 

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/
Ultimate Partner Mike_James
3,495 Posts
Ultimate Partner
New Zealand
Mike_James
Ultimate Partner

3495Posts

1311Kudos

421Solutions

Re: AccountRight API must receive credentials for specific company file ?

Hi @DeveloperJack, we have always assumed that when accessing a file via the API, we need to provide a username and password as well as obtain the tokens (access and refresh). So we generally set up a username and password in the file for our own access, and this user does not require my.myob credentials.

 

Is that correct practice?


Regards, Mike (mike@datawise.co.nz)
DataWise Limited (www.datawise.co.nz), developers of:
DataWise Report Writer - Custom Reporting from MYOB programs
(Including AccountRight Classic/Live, and exo Payroll)

Partner GuyCrsk
3 Posts
Partner
GuyCrsk
Partner

3Posts

0Kudos

0Solutions

Re: AccountRight API must receive credentials for specific company file ?

Hi @DeveloperJack

 

We are developing an app consuming data from the MYOB AccountRight API.

 

Usually, Once we completed the OAuth process with an online accounting system, we were able to access the data with no need for further credentials besides the tokens received during the OAuth process. ( i.e MYOB Essentials API ).

 

So if I understand correctly, If the AccountRight account owner wishes to grant access to our app and work with a company file, he needs to complete the OAuth process and create a user for our app in his accountright system with a username and password?

 

Thanks,

Guy.

MYOB Staff Post DeveloperJack
65 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

65Posts

21Kudos

7Solutions

Re: AccountRight API must receive credentials for specific company file ?

Hi there @GuyCrsk,

This will depend on if your user has linked their my.myob credentials or not. The best way to check is to first call the /CurrentUser endpoint to determine which resources you have access to. If you don't have the permissions you need you can then prompt the client to enter their per-file credentials.

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 GuyCrsk
3 Posts
Partner
GuyCrsk
Partner

3Posts

0Kudos

0Solutions

AccountRight API must receive credentials for specific company file ?

 

Hello,

 

I wanted to verify, do all the endpoints in the AccountRight API requires the company file username and password ?

 

I mean, even though the user authorized our app to access his data, we still need the credentials for his company files(s)?

And if we do need his credentials, is the only way to recieving them is by asking the user directly ?

 

 

Thanks in advance,

Guy

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