Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Query parameter expires_in not working

I'm making request to authorize a user but it always returns 28800 as expires_in

 

Here is the URL 

https://www.fitbit.com/oauth2/authorize?response_type=code&client_id=xxxxxx&scope=activity%20heartra...

 

Whatever I put as expires_in it returns 28800

 

What is the issue?

Best Answer
0 Votes
1 REPLY 1

Hi @awais78,

 

If your application type is currently set to using the Authorization Code Grant Flow, access tokens have a default expiration of 8 hours (28800 seconds). This cannot be changed.

 

However, if you'd like your users to be able to select how long your application can access their data, you will need to change your application settings to the Implicit Grant Flow. This authorization flow allows users to select how long they give consent to your application (1 day, 1 week, 30 days, or 1 year).

 

I hope this helps!

Best Answer