I have been using django-twilio for a while now to send SMS messages to users of my application. My setup is fairly simple, quite similar to the django-twilio docs. I am storing the credentials inside my virtualenv /bin/activate.sh.
I am then using the django-twilio discover_twilio_credentials() to retrieve the credentials.
account_sid, auth_token = discover_twilio_credentials(request.user)
client = TwilioRestClient(account_sid, auth_token)
This works fine, however discover_twilio_credentials() is expecting a user instance passed to it. I now need to be able to send sms without the user making a post, so i need to get the twilio credentials without the user instance. The obvious solution to this would be to have a User instance which is just for getting the credentials but it doesn't seem very nice!
So does anyone know how to get discover_twilio_credentials() without a user instance?