Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Video is not being sent to direct. #2054

Open
Anton-Euro opened this issue Nov 6, 2024 · 3 comments
Open

[BUG] Video is not being sent to direct. #2054

Anton-Euro opened this issue Nov 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Anton-Euro
Copy link

Try Instagrapi SaaS with a free trial https://hikerapi.com/p/5GBWznd3

Describe the bug
When I try to send a video to direct, it gives an error:
instagrapi.exceptions.UnknownError: This feature is no longer supported.

To Reproduce

from instagrapi import Client

cl = Client()
cl.login("login", "password")

cl.direct_send_video("path/to/video", user_ids=[user_id])

Traceback

Traceback (most recent call last):
  File "/Users/geml/python/semily_consulting/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 359, in _send_private_request
    response.raise_for_status()
  File "/Users/geml/python/semily_consulting/.venv/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/direct_v2/threads/broadcast/configure_video/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/geml/python/semily_consulting/instagram_bot/test.py", line 6, in <module>
    cl.direct_send_video("/Users/geml/Desktop/cTZgi4Foyuc0Kahm.mp4", user_ids=[70576365517])
  File "/Users/geml/python/semily_consulting/.venv/lib/python3.12/site-packages/instagrapi/mixins/direct.py", line 502, in direct_send_video
    return self.direct_send_file(path, user_ids, thread_ids, content_type="video")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geml/python/semily_consulting/.venv/lib/python3.12/site-packages/instagrapi/mixins/direct.py", line 575, in direct_send_file
    result = self.private_request(
             ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geml/python/semily_consulting/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 541, in private_request
    raise e
  File "/Users/geml/python/semily_consulting/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 526, in private_request
    self._send_private_request(endpoint, **kwargs)
  File "/Users/geml/python/semily_consulting/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 448, in _send_private_request
    raise UnknownError(**last_json)
instagrapi.exceptions.UnknownError: This feature is no longer supported.

Desktop:

  • OS: MacOS Sequoia
  • Python version 3.12.7
  • instagrapi version latest
  • moveipy version 1.0.3
@Anton-Euro Anton-Euro added the bug Something isn't working label Nov 6, 2024
@ShashiTharoor
Copy link

was it working before?

@MohammadNasrIsfahany
Copy link

I have this problem too.

@mnproduction
Copy link

Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants