Skip to content

Instantly share code, notes, and snippets.

@zzarcon
Created December 23, 2015 22:22
Show Gist options
  • Select an option

  • Save zzarcon/f5f333b93237b8f1355c to your computer and use it in GitHub Desktop.

Select an option

Save zzarcon/f5f333b93237b8f1355c to your computer and use it in GitHub Desktop.
curl 'https://www.instagram.com/accounts/login/ajax/' -H 'Cookie: csrftoken=a93735bbc831ea62cb5cc4d4f42e50ad' -H 'X-Instagram-AJAX: 1' -H 'Referer: https://www.instagram.com/' -H 'X-CSRFToken: a93735bbc831ea62cb5cc4d4f42e50ad' -H 'X-Requested-With: XMLHttpRequest' --data 'username=zzarcon&password=11111' --compressed
@joanromano
Copy link

var request = require("superagent")
require("superagent-csrf")(request)
var endpoint = "https://www.instagram.com/accounts/login/ajax/"
var user = "test"
var pass = "test"
var token = "a93735bbc831ea62cb5cc4d4f42e50ad"

request.post(endpoint)
.csrf(token)
.set("Referer", "https://www.instagram.com")
.set("X-CSRFToken", token)
.set("X-Requested-With", "XMLHttpRequest")
.set("X-Instagram-AJAX", "1")
//.type('form')
//.send({
// 'username': user,
// 'password': pass
//})
.send("username=test")
.send("password=test")
.end(function(err, res) {
var data = res.body
console.log(err)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment