There are test numbersmy test credentialsを使用してSMSを送信することができます。彼らは美しく送ることを偽ります。しかし、また、Twilioが提供するlookup APIを使用しようと、意図がtest numberに関する情報を取得する場合でも、失敗します:Twilio検索テスト番号
>>> 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ことができない、固定電話をエミュレートするために記載されている電話番号のみですSMSを返す私はこのような番号のキャリアタイプのAPIを 'landline'に戻すことを期待しています。 That link in the error messageは、動作するテスト資格情報がないページに私を連れてきます。
テスト資格情報を指定してルックアップAPIをテストするにはどうすればよいですか?
Dang。ありがとうと思います! – Brian