Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RestClient Client = new RestClient(Settings.Url)
- {
- UserAgent = Settings.UserAgent,
- FollowRedirects = false
- };
- RestRequest Req = new RestRequest(Method.POST);
- Req.AddHeader("Content-Type", Settings.ContentType);
- Req.AddHeader("Accept", "application/json, text/plain, */*");
- Req.AddHeader("Accept-Encoding", "gzip, deflate, br");
- Req.AddHeader("Accept-Language", "en-US,en;q=0.9");
- Req.AddHeader("Referer", Settings.Referer);
- Req.AddParameter("remember=false&username=xxx&password=xxx&captcha_token=&csrf_token=", ParameterType.RequestBody);
- Client.ExecuteAsync(Req, response =>
- {
- if (response.StatusCode == HttpStatusCode.BadRequest)
- {
- Console.WriteLine("Access DENIED!", Color.DarkRed);
- }
- else
- {
- Console.WriteLine("Accessed.", Color.Green);
- }
- });
- public class Settings
- {
- public static string Url = "https://accounts.spotify.com/api/login";
- public static string Referer = "https://accounts.spotify.com/en/login/";
- public static string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36";
- public static string ContentType = "application/x-www-form-urlencoded";
- }
Add Comment
Please, Sign In to add comment