How can I upload story to Instagram with Instagrapi

93 Views Asked by At

I wish to upload an automated story to Instagram with a Python script. I'm trying to use Instagrapi. Following the examples I do:

from instagrapi import Client
cl = Client()cl.login('MY USER', 'MY PASSWORD')
cl.photo_upload_to_story("Images/image1.jpg",caption="life is beautiful")
cl.logout()

Although the story is uploaded, the caption doesn't appear and I get this message:

ValidationError: 1 validation error for StorypkInput should be a valid string [type=string_type, input_value=3280857193925337918, input_type=int]For further information visit https://errors.pydantic.dev/2.5/v/string_type
0

There are 0 best solutions below