I have been trying to get the MYOB access code using my API keys for two days to no avail...
I got the access code from `https://secure.myob.com/oauth2/account/authorize`, passing my client_id (API key), redirect URI (URL encoded), scope. At first I got the "DeveloperInactive" error but by adding `x-myobapi-key` in the headers (the same API key as in client_id) that has gone away.
Now I have a different problem. Using the `code` from previous, I created this get_access_token script (in python)
```
data = {
'client_id': 'q[redacted]y',
'client_secret': 'Z[redacted]z',
'scope': 'CompanyFile',
'code': 'Wkb[redacted]', # what I got from the previous step
'redirect_uri': '[redacted]',
'grant_type': 'authorization_code'
}
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
resp = requests.post(url, data=data, headers=headers)
print(resp.content)
```
this simply returns `'{"error":"invalid_request"}'`
I am new to this process and I'm not sure how the request can be invalid. I have tried many combinations of the redirect_uri and the code being url_encoded or not. I simply want to access the company files. Hope someone can enlighten me. Thanks.