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

How do I download an image with authentication? #840

Open
brycepg opened this issue Feb 3, 2025 · 1 comment
Open

How do I download an image with authentication? #840

brycepg opened this issue Feb 3, 2025 · 1 comment

Comments

@brycepg
Copy link

brycepg commented Feb 3, 2025

The docs do not mention authentication: https://www.twilio.com/docs/whatsapp/tutorial/send-and-receive-media-messages-whatsapp-python

Does this library support doing it easily?

When I issue a GET request to a media file, I get a 401 unauthenticated

@GustavoD1
Copy link

Yes, the Twilio Python library supports authentication for retrieving media files. When making a GET request to a media file, you need to authenticate using Basic Auth with your Twilio Account SID and Auth Token.

Make sure:

  • Your ACCOUNT_SID and AUTH_TOKEN are correct.
  • The MEDIA_URL is correctly formatted.
  • Your Twilio account has the necessary permissions to access media files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants