dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.99k stars 1.14k forks source link

Instagram call checkpoint for this action! #11

Closed TonyG-git closed 8 years ago

TonyG-git commented 8 years ago

Hi! Code:

var Client = require('instagram-private-api').Client.V1;
var device = new Client.Device('SAMSUNG_GALAXY_S2', 'xxx');
var cookiePath = __dirname + './cookies/xxx.json';
var promise = Client.Session.create(device, cookiePath, 'xxx', 'yyy');

promise.then(function(sessionInstance){
   console.log(sessionInstance)
});

get me error: Unhandled rejection CheckpointError: Instagram call checkpoint for this action!

Whats wrong?

kvcpr commented 8 years ago

Hey, Instagram detect unusual action (maybe spam?) from your IP/account so they want to make checkpoint. (Captcha or phone)

huttarichard commented 8 years ago

@TonyG-git Meaning you got error from API, which is not handled!

promise
  .then(function(sessionInstance){
     console.log(sessionInstance)
  })
  .catch(Client.Exceptions.CheckpointError, function(error) {
     console.error("Please don't spam :/")
  })
huttarichard commented 8 years ago

@kacepe thanks for quick answer :P