06-14-2016 05:25
06-14-2016 05:25
Hi,
I am using Authorization code grant flow in my app. Life of access token is 3600 (which is one hour). This is very short time. My app usually uploads activity once in a day. So access token expiry error will be thrown each time we try to upload activity, which will then be followed by refresh request, getting a new access token, and making upload request again. Basically first upload request is a waste.
I have 2 questions -
1) Is it better to check refresh token expiry, and then make upload request. if one hour is already over since last request, should we make a token refresh request directly, and then upload it? Instead of relying on a failed response.
2) Also is there a way we can set longer life for access_token? I know documentation says, expirty argument is only for "implicit code grant flow", but 1 hour is too short.Would be better if it was atleast a week.