Search code examples
pythonpython-3.xinstagram

Problem upploading videos and photos to instagram with instapy-cli


Hi I have tried to upload to instagram with instapy-cli but I get this error OSError: Unable to upload. I don't know whats wrong or if it's posible to do this.

Here is the code i "wrote"

from instapy_cli import client

username = '******'
password = '*****'


video = 'pic.jpg'
text = 'Test'

with client(username, password) as cli:
    cli.upload(video, text)

So I guess the question is if it's still possible to post to instagram with python?


Solution

  • You are getting this error probably because Instagram made changes in the API.

    I tried Instagram-API-python but upload is not working in it too.

    There is official Instagram Graph API endpoint for posting media but it is in closed beta with Facebook Marketing Partners and Instagram Partners only.

    Only option left is automating it with Selenium.