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

not able to use API

Hi,

 

I am creating an android app which will use the fitbit users data. I have the authorization using OAuth.io library and have received a token and a secret. I have a question that since I am using OAuth.io for authorization, the token I got, is it the final access token and if it is then how should I use it to get other information for users like his latest activities Also how can I get the client ID. I am trying the resource API bt since I dont have client ID it fived oauth error. Can anybody help as I have read the documentation but not able to understand how should I do it.

 

Thanks..

 

Best Answer
0 Votes
3 REPLIES 3

What exact API endpoint are you trying to call?

Why do you need client id?

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Basically I need the user ID. I am trying the API 

GET http://api.fitbit.com/1/user/228TQ4/activities/date/2010-02-25.json to get the user activities. But I dont have the ID . 

 

I am able to get response now when I use http://api.fitbit.com/1/user/-/activities/date/2010-02-25.json for the active user. But in case I need to use user ID, how can I get it?

 

Thanks

 

 

Best Answer
0 Votes

In your particular api url that you pasted user id is: 228TQ4

you may also skip it and it should be like: 

http://api.fitbit.com/1/user/-/activities/date/2010-02-25.json

this way you'll get what ever user's data whou secret key you're using to make request.

I suggest go through documentation here: https://wiki.fitbit.com/display/API/Fitbit+API

it has all information on how the api works. In most of the cases you don't need user id at all.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes