The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.
07-17-2023 10:23 AM
Hello Everyone,
To preface this, i am very new to working with APIs so have been trying to follow multiple tutorials...Im sure this topic has been discussed before, but i cannot find my situation and am hoping someone can help me...
So...
I have followed the instructions on authorization Iincluding using the correct read_all in the scope that trips a lot of people up.
I am able to exchange the code for an access token, and the retrieve all of my activities - no problems - Great stuff!
I save the token to a json file, opening and checking the expiry each time i make a new call.
The problem arises 6 hours later - i need to use the refresh token to get a new access token - which i (seemingly) do without issue, i make the request and recieve back the new access token (and update my saved json file)- but i can no longer retrieve all of my activites.
Am i doing something wrong? do i need to include something when requesting my new access token? Ive been searching round google for about a week and havent found a solution - it doesnt help that i cant check if it failed for 6 hours after i get it to work!
Would love any thoughts or feedback!
Thanks
Solved! Go to Solution.
07-20-2023 03:28 PM
The API doesn't actually seem to refresh an access token until after the access token expires. So attempting to refresh before expiry will return them same access token.
07-20-2023 03:28 PM
The API doesn't actually seem to refresh an access token until after the access token expires. So attempting to refresh before expiry will return them same access token.
Welcome to the Community - here is your guide to help you get started!