PHP Classes

Fitbit oauth2.0

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How to Implement a PH...  >  All threads  >  Fitbit oauth2.0  >  (Un) Subscribe thread alerts  
Subject:Fitbit oauth2.0
Summary:How to refresh token
Messages:3
Author:Edmund
Date:2016-10-17 14:00:15
 

  1. Fitbit oauth2.0   Reply   Report abuse  
Picture of Edmund Edmund - 2016-10-17 14:00:15
After successfully authenticating, I store the access token and refresh token into my DB. As per oauth2.0, the access token will expires in 1 hour. Do you have an example on how to refresh the access token using the saved refresh token?

This is for fitbit2. Cheers for any help.

Ed

  2. Re: Fitbit oauth2.0   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-10-17 21:56:40 - In reply to message 1 from Edmund
The class automatically refresh the token before making any calls and stores in the container. If you use one sub-class that uses a database container, the class will store the new token in the database for you.

  3. Re: Fitbit oauth2.0   Reply   Report abuse  
Picture of Edmund Edmund - 2016-10-18 07:32:32 - In reply to message 2 from Manuel Lemos
Hi Lemos, thanks for the reply. Which class should I be looking at? RetrieveToken?