Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1. using (var request = new HttpRequest())
  2.             {
  3.  
  4.  
  5.                
  6.                
  7.                 request.IgnoreProtocolErrors = true;
  8.                 request.UserAgent = Http.FirefoxUserAgent();
  9.                 request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
  10.                 request.AllowAutoRedirect = true;
  11.                 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";
  12.                 byte[] postBytes = Encoding.ASCII.GetBytes(postdata);
  13.  
  14.                 string resp = request.Post("https://android-api.fitbit.com/oauth2/token/", postBytes , "application/x-www-form-urlencoded").ToString();
  15.  
  16.  
  17.                 Console.Write(resp.ToString());
  18.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement