cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.

Help getting activities after token refresh

stereadman
Mt. Kenya

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 

1 ACCEPTED SOLUTION

crm86
Shkhara

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. 

View solution in original post

1 REPLY 1

crm86
Shkhara

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. 

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!


Know how to use Community


Understand Community Settings