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

Error message when using jmitchell38488 oAuth php code

ANSWERED

I am using this for my college project https://github.com/jmitchell38488/oauth2-fitbit

 

I have installed it, and when I run it I get the following error on the fitbit website:

 

Developer information: invalid_request - Missing parameters: client_id

I am using the "Authenticate Session" code as shown on the github page, and have edited 

 

$provider = new FitBitAuthorization([
    'clientId'      => $my_client_id_from_fitbit,
    'clientSecret'  => $my_client_secret_from_fitbit,
    'redirectUri'   => $my_callback_url,
]);

with my own details. What am I doing wrong?

 

I am using wampserver and my redirectUri is localhost - where the web app will be used for testing purposes. It is running PHP version 5.5

Best Answer
0 Votes
2 BEST ANSWERS

Accepted Solutions

Hi @Matt.Swart,

 

I'll be able to help you out overnight when I'm back. Please feel free to start any discussions that you have on my github: https://github.com/jmitchell38488/oauth2-fitbit

 

Cheers,

 

Justin

View best answer in original post

Best Answer
In the authorisation section of your code have you changed PROMPT_CONSENT to PROMPT_NONE? As consent always asks the user to login. See the Authorisation Page section here for more detail https://dev.fitbit.com/docs/oauth2/

View best answer in original post

Best Answer
5 REPLIES 5

@jmitchell38488 any chance you have some words of wisdom to help out a bunch of college students? We coded your code you put up on GitHub and filled in what we thought was the blanks and at the very least we are getting some feed back but the feed back in question is invalid_request - Missing parameters: client_id.

Any help will be awesome and thanks for your time.

Regards 

MattSwart and JordanHarrison

Best Answer
0 Votes

Hi @Matt.Swart,

 

I'll be able to help you out overnight when I'm back. Please feel free to start any discussions that you have on my github: https://github.com/jmitchell38488/oauth2-fitbit

 

Cheers,

 

Justin

Best Answer

HI @jmitchell38488

 

Sorry to be asking but is there any way that we can automate the auth request file. We downloaded your files from GitHub and it works perfectly but have to manually have to hit the allow button every time we want to acquire info for our project. We have tried to set up a crontab in Linux to handle this but coming up short and one of the guys tried to write a PHP script but again we are coming up short.

 

Any help would be awesome.

 

Kind regards 

Matthew

Best Answer
0 Votes
In the authorisation section of your code have you changed PROMPT_CONSENT to PROMPT_NONE? As consent always asks the user to login. See the Authorisation Page section here for more detail https://dev.fitbit.com/docs/oauth2/
Best Answer

@GaryBrittain thanks a million that has been wrecking our heads for days 

 

Best Answer
0 Votes