Closed afansv closed 4 years ago
@afansv
I've found out the problem!
The TWILIO_ACCOUNT_SID
and TWILIO_AUTH_TOKEN
in settings is not being used.
Actually this app use env vars.
This is code from utils.py
twilio_client = Client(os.environ['TWILIO_ACCOUNT_SID'], os.environ['TWILIO_AUTH_TOKEN'])
As you can see... os.environ here!
So you should download this library and change this or export env vars to your environment:
This would solve the problem! export TWILIO_ACCOUNT_SID=secret export TWILIO_AUTH_TOKEN=secret
Thank you @taime. This works Also, check this out https://github.com/TwilioDevEd/server-notifications-django/blob/master/.env_example
@afansv I've found out the problem! The
TWILIO_ACCOUNT_SID
andTWILIO_AUTH_TOKEN
in settings is not being used. Actually this app use env vars.This is code from
utils.py
twilio_client = Client(os.environ['TWILIO_ACCOUNT_SID'], os.environ['TWILIO_AUTH_TOKEN'])
As you can see... os.environ here!
So you should download this library and change this or export env vars to your environment:
This would solve the problem! export TWILIO_ACCOUNT_SID=secret export TWILIO_AUTH_TOKEN=secret
Hey– this is mentioned in the readme:
and set the ``TWILIO_ACCOUNT_SID`` and ``TWILIO_AUTH_TOKEN`` environment
variables.
I'll add some notes to make sure it's clearer that this is your environment and not settings file:
These are read from `os.environ`, so make sure you don't put
them in your settings file accidentally.
Hello, everyone! I have a problem with sms auth using Twilio. That's my settings:
And .env:
The problem is this error message (requesting /auth/mobile/):
Can you help me? I really upset about it. I don't think there is a problem with my Twilio credentials, because I have ho problem with this creds in console.