10-18-2018 01:05 - edited 10-18-2018 01:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-18-2018 01:05 - edited 10-18-2018 01:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Last year I made an app that used fitbit data and the tutorial page was very easy to follow.
Now it has changed and I am unsure how to use the curl data given to me to complete my request.
At the moment I get an unauthorized error in my code, and I think that is because I am not setting the client id and secret id with the request.
Can anyone help me?
string url = secret.ajaxUrl; WebRequest myReq = WebRequest.Create(url); string credentials = secret.clientID + ":" + secret.secretID; CredentialCache mycache = new CredentialCache(); myReq.Headers["Authorization"] = "Basic " + CODE; myReq.ContentType = "application/x-www-form-urlencoded"; WebResponse wr = myReq.GetResponse(); Stream receiveStream = wr.GetResponseStream(); StreamReader reader = new StreamReader(receiveStream, Encoding.UTF8); string content = reader.ReadToEnd();
10-24-2018 12:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



10-24-2018 12:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @impo,
I'll be happy to clarify the OAuth process for you. Are there certain pieces of the curl command that you need clarified?
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

10-24-2018 18:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-24-2018 18:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @Gordon-C,
Thanks for the reply!
But I managed to get it working. just don't ask how because I don't know what I did
I did a lot of digging through the forums and found a nearly working example I was able to edit enough to get the returns I needed.

10-24-2018 20:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



10-24-2018 20:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Congrats! Thanks for the update. Please use the forums again if you have further questions.
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

