06-23-2014 19:00 - last edited on 06-30-2014 12:42 by JeremiahFitbit
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-23-2014 19:00 - last edited on 06-30-2014 12:42 by JeremiahFitbit
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello,
I am developing a website using visual studio 2012 asp.net and C#. I am working on a similar idea as explained in fitbit API documents
"Website A wants to integrate with Fitbit.com so that Website A's users can integrate their Fitbit data into Website A. There is a user Joe, who has an account on both Website A and Fitbit.com. First, Joe allows Website A to access and modify his Fitbit data. Once this authentication occurs, Website A can freely make HTTP calls to get and to modify Joe's data. Website A can also subscribe to any changes in Joe's data. For instance, when Joe updates his daily step count or syncs the tracker device, Fitbit.com automatically notifies Website A of this change via an HTTP callback, thus Website A can fetch updated resources only when necessary"
But Actually I am confused how to start so is there any resource that help me understand step by step
Thanks,
Answered! Go to the Best Answer.
Accepted Solutions
06-28-2014 09:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-28-2014 09:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
If you download the Fitbit.NET API library I maintain on Github (lots of recent contributions -- thanks) it has a runnable sample website (ASP.NET C# MVC) that has the library referenced and a few examples of pulling data all in native code. You just need in insert a consumer key / consumer secret that you get from dev.fitbit.com in the Web.Config where the placeholders "YOU_CONSUMER_KEY" are.
There was someone else trying to run it with Visual Studio 2012 and having issues so I'd recommend you at least download the free Visual Studio 2013 editions or you can create a new website in 2012 and add in just the Fitbit library as a reference and start from scratch.
--Aaron

06-24-2014 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-24-2014 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Absolutely.
Check out https://wiki.fitbit.com/display/API/Fitbit+API
Senior Software Developer at Fitbit
06-25-2014 04:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-25-2014 04:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Appreciated 🙂
Is there any video tutorials ?
Thanks,

06-26-2014 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-26-2014 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Unfortunately there no any official Fitbit video tutorials.
Senior Software Developer at Fitbit

06-27-2014 10:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



06-27-2014 10:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
The Fitbit API is a web service API. This means that you can retrieve data via HTTP in the way that you can retrieve web pages in your browser.
The Fitbit API uses OAuth 1.0a for authentication. This means that in order for your application to retrieve data about a Fitbit user, that user has to give the application permission to access their data. Then, when your application wants to make an HTTP request, your application must send a special Authorization header that confirms it truly has permission to access the user's data.
Find an OAuth 1.0a library for your preferred language and framework. Create a user authorization flow to obtain user consent. Then make the HTTP requests with the OAuth Authorization header.
Aaron Coleman's .NET library is very popular.
06-28-2014 09:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-28-2014 09:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
If you download the Fitbit.NET API library I maintain on Github (lots of recent contributions -- thanks) it has a runnable sample website (ASP.NET C# MVC) that has the library referenced and a few examples of pulling data all in native code. You just need in insert a consumer key / consumer secret that you get from dev.fitbit.com in the Web.Config where the placeholders "YOU_CONSUMER_KEY" are.
There was someone else trying to run it with Visual Studio 2012 and having issues so I'd recommend you at least download the free Visual Studio 2013 editions or you can create a new website in 2012 and add in just the Fitbit library as a reference and start from scratch.
--Aaron

07-16-2014 02:54 - edited 07-16-2014 02:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-16-2014 02:54 - edited 07-16-2014 02:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JeremiahFitbit wrote:The Fitbit API is a web service API. This means that you can retrieve data via HTTP in the way that you can retrieve web pages in your browser.
The Fitbit API uses OAuth 1.0a for authentication. This means that in order for your application to retrieve data about a Fitbit user, that user has to give the application permission to access their data. Then, when your application wants to make an HTTP request, your application must send a special Authorization header that confirms it truly has permission to access the user's data.
Find an OAuth 1.0a library for your preferred language and framework. Create a user authorization flow to obtain user consent. Then make the HTTP requests with the OAuth Authorization header.
Aaron Coleman's .NET library is very popular.
Thank you so much for your explanation 🙂

07-16-2014 02:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-16-2014 02:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@aarondcoleman wrote:If you download the Fitbit.NET API library I maintain on Github (lots of recent contributions -- thanks) it has a runnable sample website (ASP.NET C# MVC) that has the library referenced and a few examples of pulling data all in native code. You just need in insert a consumer key / consumer secret that you get from dev.fitbit.com in the Web.Config where the placeholders "YOU_CONSUMER_KEY" are.
There was someone else trying to run it with Visual Studio 2012 and having issues so I'd recommend you at least download the free Visual Studio 2013 editions or you can create a new website in 2012 and add in just the Fitbit library as a reference and start from scratch.
--Aaron
Thanks alot I will follow your advice 🙂

08-11-2015 08:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-11-2015 08:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I have downloaded the sample app and got it running but can go no further. Your second paragragh describes exactly what I need to know how to do. It just doesn't say how to do it. So how does my application make an http request and send a special authorization header? Also what part of the sample app code is considered the library that I would need to include in my application? Where do I find the OAuth 1.0a library for my preferred language and framework? How do I create a user authorization flow to obtain user consent?

08-11-2015 10:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-11-2015 10:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Reem, I have been searching for a week for the same thing you are looking for. I also am looking for the step by step solution but so far I haven't found one. The documentation provides very little as to how to even begin.

08-17-2015 13:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-17-2015 13:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@jschrimshire wrote:I have downloaded the sample app and got it running but can go no further. Your second paragragh describes exactly what I need to know how to do. It just doesn't say how to do it. So how does my application make an http request and send a special authorization header? Also what part of the sample app code is considered the library that I would need to include in my application? Where do I find the OAuth 1.0a library for my preferred language and framework? How do I create a user authorization flow to obtain user consent?
OK, lots of questions:
- The library handles the underlying HTTPS connections, you just call the methods in FitbitClient class.
- The Authorization header is also abstracted. Again, you use the code to do this.
- Everything under Fitbit.NET in the solution is the library, everything in SampleMVCWeb is the sample website that we made that consumes the librray.
- OAuth is baked in.
- The Auth flow is in Authenticator.cs
All of that said, we've got a new fork of the library that we're going to introduce as the primary once OAuth 2.0 is out of beta. I did a quick video demo recently to show how that progress is coming and you might find that useful as a step-by-step. Much is similar to the existing stable library: https://www.youtube.com/watch?v=ggx-4SwuYm4
--Aaron


