02-07-2015 03:05 - edited 02-07-2015 03:09
02-07-2015 03:05 - edited 02-07-2015 03:09
Yesterday everything worked fine, Today same 401 Error reviced after first request with consumerkey/secret (STEP A).
I strictly follow the rules and one day the OAuth works the next day it doesnt work.
Are there any troubles with Fitbit ?
---------------------------------------
This is the simple code.
req_url, conskey and conssec taken from the fitbit APP registration page !
$oauth = new OAuth($conskey, $conssec);
$request_token_info = $oauth->getRequestToken($req_url, $callbackurl);
And this again is the result !
Message: Invalid auth/bad request (got a 401, expected HTTP/1.1 20X or a redirect)
File: /var/www/index.php
Line: 62
Code: 401
TraceString: #0 /var/www/index.php(62): OAuth->getRequestToken('https://api.fit...', 'http://www.uhea...') #1 {main}
Array ( [0] => Array ( [file] => /var/www/index.php [line] => 62 [function] => getRequestToken [class] => OAuth [type] => -> [args] => Array ( [0] => https://api.fitbit.com/oauth/request_token [1] => http://www.uhealthbook.at ) ) )
02-09-2015 19:33
02-09-2015 19:33
Please test if you can make requests using https://dev.fitbit.com/apps/oauthtutorialpage
and you still see 401 response.
Possible reason that you all of a suddes started seeing 401 may be that user revokes access for your app to see his data.