Instagram-private-api: How to set a profile pic?

Created on 28 Oct 2019  路  3Comments  路  Source: dilame/instagram-private-api

Hey guys,

Can anyone pls share code example of how to set profile picture?

I've tried to use ig.account.changeProfilePicture('path_to_picture') but id didnt worked.

Most helpful comment

Maybe instagram changed something?

This is right. Instagram switched to the fb-uploader (with uploadIds), so the method broke.
You can see the new, working method here on my fork.
If you want to use it now, replace this.client with ig and copy it into your project.

All 3 comments

So i guess this method doesn't work anymore

Tried to use this

const rStream = createReadStream('./profile_pic')
await ig.account.changeProfilePicture(rStream).catch(err=>console.log(err))

and I'm getting

IgResponseError: POST /api/v1/accounts/change_profile_picture/ - 400 Bad Request;

Maybe instagram changed something?

Maybe instagram changed something?

This is right. Instagram switched to the fb-uploader (with uploadIds), so the method broke.
You can see the new, working method here on my fork.
If you want to use it now, replace this.client with ig and copy it into your project.

Maybe instagram changed something?

This is right. Instagram switched to the fb-uploader (with uploadIds), so the method broke.
You can see the new, working method here on my fork.
If you want to use it now, replace this.client with ig and copy it into your project.

Awesome, thanks a lot, works perfect :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DenisKrsk picture DenisKrsk  路  33Comments

ciolt picture ciolt  路  35Comments

codingzombies picture codingzombies  路  19Comments

27RU57 picture 27RU57  路  12Comments

nikitaulshin picture nikitaulshin  路  17Comments