03-30-2017 11:26
03-30-2017 11:26
This seems to be a well documented problem, but I don't seem to be able to find an actual resolution.
I refresh the token, only ever use it once :
Array
(
[access_token] => eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIzWDk5RlgiLCJhdWQiOiIyMjhETEgiLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJzY29wZXMiOiJyYWN0IiwiZXhwIjoxNDkwOTI2ODA1LCJpYXQiOjE0OTA4OTgwMDV9.rNTlfHPE1o5kO2tW5QJDQPeMrymowWHNul5kdyUzAjo
[expires_in] => 28800
[refresh_token] => f81b3cb2cd7c7be690365a90ad44253a1d86ffa4668a956acb1543c3cc7f8ae4
[scope] => activity
[token_type] => Bearer
[user_id] => 3xxxxx
)But when I use it, I get an expired_token error:
[errors] => Array
(
[0] => Array
(
[errorType] => expired_token
[message] => Access token expired: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIzWDk5RlgiLCJhdWQiOiIyMjhETEgiLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJzY29wZXMiOiJyYWN0IiwiZXhwIjoxNDkwODk0MTY0LCJpYXQiOjE0OTA4NjUzNjR9.750O2u-8qlj7wCrAT24Xu5Wrwi4r4uYyTMOIYCQO7os. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process.
)
)
[success] => I just don't know what I'm doing wrong, everything works properly while the token hasn't expired, and no permissions have been revoked, as it's only me using the account.
This is a PHP cURL implementation.
What am I doing wrong?
03-31-2017 00:29 - edited 03-31-2017 12:52
03-31-2017 00:29 - edited 03-31-2017 12:52
Edit - It seems that the refresh simply isn't having any affect, despite it being called correctly. I can only get it to work, after it has expired, by getting a new authorization_code.
Is it anything to do with the fact I'm accessing Intraday Data?
Any ideas?
Best Answer01-20-2018 22:47 - edited 01-21-2018 02:49
01-20-2018 22:47 - edited 01-21-2018 02:49
edited to remove content as worked it out
Best Answer