Closed Araknos closed 5 years ago
It is possible.
const Client = require('instagram-private-api').V1.Client;
Please use the latest library version. Check this examples: https://github.com/dilame/instagram-private-api/blob/master/examples/upload-photo-from-web.example.ts https://github.com/dilame/instagram-private-api/blob/master/examples/upload-photo.example.ts
Thank's for your quick answers. I got now: UnhandledPromiseRejectionWarning: IgCheckpointError: POST /api/v1/accounts/login/ - 400 Bad Request; challenge_required What's that ?
Awesome ! Thank's a lot guys !
Hello, It's more a question than an issue, sorry for that. I'm writing a program in nodejs that post a photo on my page. It's a pain finding a solution and I'm just discovering ig api. Maybe it's just not possible. I wrote that:
` const pathOrStream = "./avatar.png"; var Client = require('instagram-private-api').Client.V1;
Client.Session.create(device, cookiePath, "user", "pass") .then(session => { return [Client.Upload.photo(session, pathOrStream), session] }) .spread((upload, session) => { return Client.Media.configurePhoto(session, upload.params.uploadId, "you can provide caption or go let it go") }) .then(medium => { console.log(medium) // return Instance of Client.Media });`
Got TypeError: Cannot read property 'V1' of undefined
Is it possible ? How to do that ? Thank you a lot !