08-28-2016 17:25
08-28-2016 17:25
Hi,
I am implementing Authorization Code Grant Flow. At step 3, I got the following error:
HTTP/1.1 301 Moved Permanently
Date: Mon, 29 Aug 2016 00:21:20 GMT
Content-Length: 0
Connection: keep-alive
Location: http://api.fitbit.com/token/
X-Frame-Options: SAMEORIGIN
Server: cloudflare-nginx
CF-RAY: 2d9bd7a263205408-LAX
My cURL data string looks like:
client_id=123xyz&grant_type=authorization_code&code=40359ca4b84aea1e180a4d45eff8ff4868d8188f&redirect_uri=http://localhost/incoming/fitbit.php
Is that because the redirect_uri isn't using https?
Thanks
Answered! Go to the Best Answer.
08-28-2016 18:11 - edited 08-28-2016 18:12
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
08-28-2016 18:11 - edited 08-28-2016 18:12
What is the URL that you are requesting?
Two quick observations:
http://api.fitbit.com/token" is not a valid endpoint. It should be "https://api.fitbit.com/oauth2/token".
Best Answer08-28-2016 18:11 - edited 08-28-2016 18:12
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
08-28-2016 18:11 - edited 08-28-2016 18:12
What is the URL that you are requesting?
Two quick observations:
http://api.fitbit.com/token" is not a valid endpoint. It should be "https://api.fitbit.com/oauth2/token".
Best Answer08-28-2016 20:07
08-28-2016 20:07
oh, sorry, how could I miss that.
Yes, it is working now after I use the correct uri "oauth2/token".
Thanks a lot!
Best Answer