- « Previous
-
- 1
- 2
- Next »
08-11-2015 12:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-11-2015 12:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I have downloaded the sample app and got it running but can go no further. The documentation kind of tells what needs to be done, but very little on how to do it. There are many questions but I will start with these. 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?
Thanks in advance for any light you can shed on this very complicated process.
09-10-2015 04:11 - edited 09-10-2015 04:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-10-2015 04:11 - edited 09-10-2015 04:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I spent the last 1 hour to write a code, i wrote 2 version. Here is one, but i cant test it:
var request = (HttpWebRequest)WebRequest.Create("https://api.fitbit.com/1/user/" + encoded_userid + "/body/log/weight.json"); var postData = "weight=100.0"; postData += "&date=2015-09-09"; var _data = Encoding.ASCII.GetBytes(postData); request.Headers["Authorization"] = "Bearer " + accesmodell.access_token; request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.Accept = "application/json"; request.ContentLength = _data.Length; using (var stream = request.GetRequestStream()) { stream.Write(_data, 0, _data.Length); } var _response = (HttpWebResponse)request.GetResponse();
[i'm the same user, just on another test account :P]

09-10-2015 07:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-10-2015 07:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Wow!!! I can't thank you enough. It worked. I had tried variations of this exact same code so many times with no success. It apparently comes down to the specific combination of encoding type, content type, and accept that the fitbit API requires. It is beyond my comprehension as to why this is not included in the documentation. It would save weeks of work trying to hit this exact combination. Thanks again for taking the time to help me.

09-10-2015 10:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-10-2015 10:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
No problem, we will use this code later 🙂

09-29-2015 12:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-29-2015 12:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Where do you download the sample app from?

12-12-2015 13:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-12-2015 13:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
s i kind of an older thread. The new guidlines for FitBit are to use a Chrome Cutom Tabs for the "WebView." Is this taken care of using this plug in?

12-12-2015 13:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-12-2015 13:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
s i kind of an older thread. The new guidlines for FitBit are to use a Chrome Custom Tabs for the "WebView." Is this taken care of using this plug in?

07-04-2016 12:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-04-2016 12:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Where does one find sample apps? I'm not seeing anything in the API documentation.


- « Previous
-
- 1
- 2
- Next »