Hello,
I want to catch changes that have been made in a spreadsheet in Dropbox by checking every 5 minutes.
I am using python and I tried this code:
f'response_type=code&token_access_type=offline'
Here I copy the code displayed on the webpage. This is my ACCESS_CODE_GENERATED.
Ant then I type:
BASIC_AUTH = base64.b64encode(f'{APP_KEY}:{APP_SECRET}'.encode())
headers = {
'Authorization': f"Basic {BASIC_AUTH}",
'Content-Type': 'application/x-www-form-urlencoded',
}
data = f'code={ACCESS_CODE_GENERATED}&grant_type=authorization_code'
data=data,
auth=(APP_KEY, APP_SECRET))
print(json.dumps(json.loads(response.text), indent=2))
And the output I get is
{ "error": "invalid_grant", "error_description": "code doesn't exist or has expired" }
I don't understand what is not working.
I would appreciate any help, thanks