Forum Discussion

Mo_JM's avatar
Mo_JM
Contributing User
3 months ago

Trouble getting Access token

Hi. I'm new to APIs. I know there are articles on how to obtain an Access token, but I'm still stuck. I'm using Rest Fox and trying to POST to https://secure.myob.com/oauth2/v1/authorize/ with the ap...
  • Mike_James's avatar
    Mike_James
    3 months ago

    Hi Mo_JM , you need to encode both the redirect URL and the authorization code itself.

     

    EG:
    code=Wvof%21IAA[[TRUNCATED_FOR_READABILITY]]luF&redirect_uri=http%3A%2F%2Flocalhost%2Fmyob_redirect%2F&client_id=[[MY_API_KEY]]&scope=CompanyFile&client_secret=[[MY_SECRET]]&grant_type=authorization_code