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

Register user using fitbit API

ANSWERED

Hi,

I am trying to build an application that allows user to access their fitbit data, I did the following steps:

1- I register a user using fitbit.com and register a testing app using dev.fitbit.com.

2- I got a customer and secret key.

3- Write a java code to authenticate a user and get access token.

All the above steps was done successfully.

Now I am trying to register a new user through my java code using fitbit API. keep in mind I am using the same customer and secret key but trying to register a new user.

Is this a valid case? and if so how can I do it?

Your help is appreciated.

Thanks

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

@rana wrote:

Sorry if I caused any inconvenience. I want to understand the flow so I can do a proper implementation.

Let me summarized what I have understand:

1- user will register through fitbit.com

2- user register his application and get customer and secret key

3- user will use his customer & secret key to access his data through 3rd party application.

Is that correct? 

Now if I want to write and application, every time I want to access user's data I have to ask for the following:

customer & secret key and do the authentication process and access the data. is that correct?

Thanks


Ok, so here is how it works.

Let say there is fitbit user A. If you want to write an app to get this user data you'll need to:

1) Register you app in dev.fitbit.com where your app will be issued consumer key and consumer secret.

2) You may use any user you wish to register you app

3) You need to go through oauth flow process that described here: https://wiki.fitbit.com/display/API/OAuth+Authentication+in+the+Fitbit+API . During this process you'll be issued access token and access token secret that you'll need to store somewhere. You can use these access token and access token secret to make api requests to get data for user A only.

Ivan Bahdanau
Senior Software Developer at Fitbit

View best answer in original post

Best Answer
0 Votes
11 REPLIES 11

What endpoint are you using to register a new user?

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

I am using my local server.

Can you please tell me the steps to register a user? What API to call to register a user. I saw this api

subscribe(String subscriberId, LocalUserDetail localUser, FitbitUser fitbitUser, String subscriptionId)

which is not very clear for me, what to fill in the method parameters and whether this is the correct api to call or not?

Best Answer
0 Votes

"What API to call to register a user" - this is what I was trying to figure out from you.

 

Anyways to answer it in short, you are not able to register new fitbit users via fitbit api.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Sorry if I caused any inconvenience. I want to understand the flow so I can do a proper implementation.

Let me summarized what I have understand:

1- user will register through fitbit.com

2- user register his application and get customer and secret key

3- user will use his customer & secret key to access his data through 3rd party application.

Is that correct?

Now if I want to write and application, every time I want to access user's data I have to ask for the following:

customer & secret key and do the authentication process and access the data. is that correct?

Thanks

Best Answer
0 Votes

@rana wrote:

Sorry if I caused any inconvenience. I want to understand the flow so I can do a proper implementation.

Let me summarized what I have understand:

1- user will register through fitbit.com

2- user register his application and get customer and secret key

3- user will use his customer & secret key to access his data through 3rd party application.

Is that correct? 

Now if I want to write and application, every time I want to access user's data I have to ask for the following:

customer & secret key and do the authentication process and access the data. is that correct?

Thanks


Ok, so here is how it works.

Let say there is fitbit user A. If you want to write an app to get this user data you'll need to:

1) Register you app in dev.fitbit.com where your app will be issued consumer key and consumer secret.

2) You may use any user you wish to register you app

3) You need to go through oauth flow process that described here: https://wiki.fitbit.com/display/API/OAuth+Authentication+in+the+Fitbit+API . During this process you'll be issued access token and access token secret that you'll need to store somewhere. You can use these access token and access token secret to make api requests to get data for user A only.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Please refer here for more details: https://wiki.fitbit.com/display/API/Fitbit+API

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

I got the whole picture.

Thank you

Best Answer
0 Votes

How do I get access to the wiki?

Best Answer
0 Votes

@mistyper: The documentation has moved to https://dev.fitbit.com/docs

Best Answer
0 Votes

Not able to open "https://wiki.fitbit.com/display/API/OAuth+Authentication+in+the+Fitbit+API" URL. and not able to get the solution.

Best Answer
0 Votes

Can you explain me what actually do for register and login user from app using API?

Best Answer
0 Votes