Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (var request = new HttpRequest())
- {
- request.IgnoreProtocolErrors = true;
- request.UserAgent = Http.FirefoxUserAgent();
- request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
- request.AllowAutoRedirect = true;
- var postdata = "grant_type=password&client_id=2295XJ&username=dxlyysb@mailsac.com&password=mindeelo88&scope=activity%20heartrate%20location%20nutrition%20profile%20settings%20sleep%20social%20weight&expires_in=31536000";
- byte[] postBytes = Encoding.ASCII.GetBytes(postdata);
- string resp = request.Post("https://android-api.fitbit.com/oauth2/token/", postBytes , "application/x-www-form-urlencoded").ToString();
- Console.Write(resp.ToString());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement