Forum Discussion

leonard_xenia's avatar
leonard_xenia
Contributing User
6 years ago

x-myobapi-exotoken is required - how to get it??

Hi All,

 

Bassically we have devoloped an android app that talks with MYOB EXO API. We are using endpoints such as Debtors, SalesOrder etc https://developer.myob.com/api/exo/endpoints/

 

We are not using the OnTheGo system but rather using http://[OurAddress]:8888

 

Regarding the Authentication for each request we have the x-myobapi-key header, we also have the username and password for the Authorization header. However whenever I attempt to make API requests it keeps saying x-myobapi-exotoken requiredso I understand the request needs it but how do we get it?

 

I saw there is a token endpoint that refreshes the token but even this endpoint requires an exo-token: https://developer.myob.com/api/exo/endpoints/token/

 

Can somebody advise please on how I can authenticate correctly with the token I need? Im fairly new to MYOB so any advice is appreciated?

1 Reply

Replies have been turned off for this discussion
  • Will_H's avatar
    Will_H
    MYOB Moderator
    5 years ago

    Hi Forum readers,

     

    I've just come to update this post, because someone just asked me, and pointed this out as an unanswered question where they had hoped to find an answer.

     

    Tog et an initial ExoToken, you need to get this generated from Exo Business itself, the token includes some licensing verification, as well as the unique identifiers for making sure the correct instance is selected when using the Relay service.

    To get an Exo token you need an administrator user to:

    1. Open EXO Config (Config.exe)
    2. Open the STAFF tab
    3. Select the appropriate user for the API to run through from the list (I generally recommend using a separate new named API user account, so that you can set its password expiry date out to 2030, and not worry about the password changing, and therefore make the password something unguessable (nice complex string)
    4. Open the API tab of the user.
    5. Tick the box to give API access
    6. Copy the ExoToken that appears in the box and provide it to the developer.
    7. PRESS SAVE to close the screen.

     

    I stress the saving, because one of the most common problems I had when consulting (including when I did this process myself) was people failing to press save when they were leaving the Staff members record.

     

    Just as a reminder, the database will need to be Licensed for the API before you can do the above.  If you're doing development testing before a license has been purchased, the best option would be to work against the Motoparts demo database.

     

    Sorry for the thread necro, but hopefully this helps someone in future. :)