There are test numbers to which you can send SMS using my test credentials. They fake sending beautifully. But, attempting to use the lookup API also provided by Twilio, even if the intention is to retrieve information about the test number, will fail:
>>> from django.conf import settings
>>> from twilio.rest.lookups import TwilioLookupsClient
>>> account_sid = settings.TWILIO_ACCOUNT_SID
>>> auth_token = settings.TWILIO_AUTH_TOKEN
>>> client = TwilioLookupsClient(account_sid, auth_token)
>>> lookup_client.phone_numbers.get('+15005555009', include_carrier_info=True)
---------------------------------------------------------------------------
TwilioRestException Traceback (most recent call last)
<ipython-input-9-03718f1c0615> in <module>()
----> 1 client.phone_numbers.get('+15005555009', include_carrier_info=True)
...
TwilioRestException:
HTTP Error Your request was:
GET https://lookups.twilio.com/v1/PhoneNumbers/+15005555009?Type=carrier
Twilio returned the following information:
Resource not accessible with Test Account Credentials
More information may be available here:
https://www.twilio.com/docs/errors/20008
+15005555009 is the only phone number listed to emulate a landline, that is incapable of returning an SMS. I am expecting the API to return 'landline' for the carrier type for such a number. That link in the error message brings me to a page with no working test credentials.
How can I test the lookup API with the test credentials given?