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

Set Oauth Details

ANSWERED

I've done the initial programmatic OAuth configuration and stored the Access Token and the Refresh Token.  I'm struggling with the way to use the Access Token to request information through the API.  The php library that I'm using says to set the OAuth authorization this way:

 

$fitbit->setOAuthDetails('token_stored_for_user', 'secret_stored_for_user');

 I have the 'token_stored_for_user' stored and available, but don't know where the 'secret_stored_for_user' comes from?  I only have the Access Token and the Refresh Token.

 

Thanks, Len

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

@ljhardy: That library has not been updated to use OAuth 2.0. It won't use refresh tokens. You should find an OAuth 2.0 library for PHP and configure it to use the Fitbit Web API.

View best answer in original post

Best Answer
0 Votes
4 REPLIES 4

Without knowing which library you're using I can't help you.

 

But you can have a look at https://github.com/jmitchell38488/fitbit

 

You can install it with composer by:

composer require jmitchell38488/fitbit

This will automatically download the latest version. How to use the library is available in the README.md document.

Best Answer
0 Votes

Thanks, I'll give that library a try.  BTW, this is the one that I was trying to use:

 

https://github.com/heyitspavel/fitbitphp

 

Unless I'm missing something your readme.md file only shows installation instructions? :

 

FitBit API Provider

Source CodeLatest VersionSoftware LicenseTotal Downloads

This package makes it simple to integrate your application with FitBit.

Installation

composer require jmitchell38488/fitbit

 

Thanks, Len

Best Answer
0 Votes

@ljhardy: That library has not been updated to use OAuth 2.0. It won't use refresh tokens. You should find an OAuth 2.0 library for PHP and configure it to use the Fitbit Web API.

Best Answer
0 Votes

Got it.  Thanks Jeremiah.


--Len

Best Answer
0 Votes