03-06-2018 00:05 - edited 03-06-2018 00:22
03-06-2018 00:05 - edited 03-06-2018 00:22
I'm trying to do oauth2 with .NET HttpClient with C# actually seems that I'm unable to do the following exact POST request with C#.
While I was able to authenticate and get the access_token and refresh_token from postman, I was unable to do that with C#. Has anyone ever had success to make fitbit authentication with C#? thanks. Seems everytime I try from c# I get 401. The Basic (base64 client_id:client_secret) header is correct, seems somewhat either C# is using a wrong encoding or is appending useless information to the POST request, from the debugger I don't see differences with the C# request and the PostMan request.
Note the above Postman request is working correctly, so I'm trying to reproduce exactly with C#.
Answered! Go to the Best Answer.
03-06-2018 01:41
03-06-2018 01:41
Ok i resolved anyway. Thanks!
03-06-2018 01:41
03-06-2018 01:41
Ok i resolved anyway. Thanks!
05-08-2019 18:30
05-08-2019 18:30
Hi,
I really in need of complete c# code to get oAuth access token, replication of Postman, can you please share.
05-08-2019 19:12
05-08-2019 19:12
Hi @spulakandam
Have you checked out Aaron Coleman's sample found on our web site: https://dev.fitbit.com/build/reference/web-api/community-resources/?
Gordon
05-09-2019 10:03
05-09-2019 10:37
05-09-2019 10:37
Hi @DeniOcean
Thank you for the recommendation.
Gordon