Forum Discussion

gregambrose's avatar
gregambrose
Contributing Partner
6 years ago

AccountRight API Authentication - On My Local Machine

Hi,

 

I'm having trouble developing API calls to cloud AccountRight  on my local machine as I can't obtain a token. I have looked at the following link which is very helpful but I cant find a solution  to my particular problem.

 

https://community.myob.com/t5/MYOB-API-questions-and-answers/Getting-Invalid-Request-when-requesting-for-Access-Token/m-p/364888#M1267

 

1. I tried to set up an account with redirect url http://etc and I found that it wasnt acceptable because the URL needed to be https. I thus created an account with https:// pointing to my clients server, where I places a suitable script to report the resulting code. All works fine there.

 

2. On my local machine, I have been trying to obtain a token, using an API call with the code returned in 1 above. It fails, and as the link above explains, apparently the token request has to come from the same machine as the redirect where the code was created.

 

If that is the case, how do I develop locally, where I don't HTTPS on my local machine, so can't use it as redirect URL to generate a code to use?

 

I cant use the code from clients system, as it wasnt generated on my machine.

 

So how do people run API calls like this from a local machine?

 

You would think this issues would be addressed in the documentation as I would think most developers would have this issue.

 

I hope you can help.

 

Greg

 

 

 

I created an 

4 Replies

Replies have been turned off for this discussion
    • gregambrose's avatar
      gregambrose
      Contributing Partner

      Hi Mike,

       

      Thanks for the reply.

       

      These are not desktop files. I'm trying to access the cloud based versions that the client is using, plus a sandbox version that was set up. How can I access these cloud based instances from my local machine?

       

      Regards
      Greg

       

       

       

       

      • Mike_James's avatar
        Mike_James
        Ultimate Partner
        My apologies, I misread your question. Perhaps an email to developers@myob.com would get you some answers.