如果发件人是美国电话号码,并且收件人是韩国电话号码,则以下面的代码传输字符的代码。
from twilio.rest import Client
account_sid = "~~~"
auth_token = "~~~"
client = Client(account_sid, auth_token)
call = client.messages.create(
to="+821012341234",# korea phone number : 010-1234-1234
from_="+18442414836", # United States phone number :(844) 241-4836
body=" this is message text contents "
)
但是,当呼叫者拨打美国电话号码和接收者拨号韩国电话号码时,发生同样的错误。
from twilio.rest import Client
account_sid = "~~~"
auth_token = "~~~"
client = Client(account_sid, auth_token)
call = client.calls.create(
to="+821012341234",# korea phone number : 010-1234-1234
from_="+18442414836", # United States phone number :(844) 241-4836
url="http://demo.twilio.com/docs/voice.xml"
)
print(call.sid)
twilio.base.exceptions.TwilioRestException: HTTP 400 error: Unable to create record: Account not authorized to call +821012341234. Perhaps you need to enable some international permissions: https://www.twilio.com/user/account/settings/international
如何打电话给韩国电话号码?
我想知道它是否是免费的版本,并且发送到韩国电话号码的发送测试受到限制。
twilio开发人员在这里。
看来,目前不允许您的帐户打电话给韩国。但是,您可以通过转到Twilio控制台中的语音通话的地理权限并检查要打电话的正确国家/地区来解决此问题。只是为了确认,该链接是https://www.twilio.com/console/voice/settings/geo-permissions/low-row-risk