Open nicolauria opened 3 years ago
I keep having this same problem too. This is my first time using the API, so I might just be doing something very wrong.
try :
(async() => {
const client = new Instagram({username: 'username', password: 'password'});
try {
await client.login();
}catch(err){
if(err.error && err.error.message === 'checkpoint_required'){
const challengeUrl = err.error.checkpoint_url;
const test = await client.updateChallenge({ challengeUrl, choice: 1});
const code = reader.question('Insert Code: ');
await client.updateChallenge({challengeUrl, securityCode: code});
}
}
await client.login();
console.log("Ready!");
})();
@William-McGonagle, i've got this error too and it was related to the file format that I was trying to upload. Apparently this API doens't work well with .png format. I just converted the image file to JPEG (.jpg) and everything worked just fine. Hope it could help you.
I am attempting to connect to the api using the following code. The console logged error is 'checkpoint_required'.
The security code is one I received by email after trying to sign in. I am using the
updateChallenge
method but still getting an error. It is the updateChallenge method that is causing the error. I've tried catching and console logging theupdateChallenge
error but the object is quite large and I'm not sure where to look. Here is the top of the error message without the entire object from the catch block.