08-20-2020 07:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-20-2020 07:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
I am currently trying to create a hyperlink that will include my app clientID and client secret to pull back a logged in userID and token to be included in a WordPress contact form. Can anyone advise on the best way to achieve this? I have read through the Fitbit WebAPI information but and tutorials but there is little information that I can find on how to achieve this and there doesn't seem to be any available plugins that carry out this process.
The API user data pull will be completed manually at a later date via python. The time parameter for the authorisation is 12 months.
Thanks
08-24-2020 10:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



08-24-2020 10:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @NickUK_1973
We don't recommend posting your client secret publicly because that will introduce vulnerabilities in the security of your application. I'm going to assume that your application will not have a server component to exchange the authorization code for an access token and refresh token. My recommendation is to look at the Implicit grant flow authorization process: https://dev.fitbit.com/build/reference/web-api/oauth2/#implicit-grant-flow
An example URL would be
After consent has occurred by the Fitbit user, the user will be redirected back to your application based on the redirect_uri specified. Your application (or python script) will need to use the provided token to query the user's data.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

