【发布时间】:2018-03-02 07:56:07
【问题描述】:
我需要从网站发送 SMS 消息。 我在 Twilio 上注册了一个帐户,我想试试是否真的收到了他们的消息。
我使用我在网上创建的这段代码:
const string accountSid = "....";
const string authToken = "....";
TwilioClient.Init(accountSid, authToken);
var to = new PhoneNumber("+40740539623");
var message = MessageResource.Create(
to,
from: new PhoneNumber("+1402-704-3438"),
body: "This is the ship that made the Kessel Run in fourteen parsecs?");
AccountSid 和 AuthToken 是正确的。但我不断收到错误消息,指出发件人号码不是您帐户的有效、支持 SMS 的入站电话号码或短代码。'
我尝试使用我的 Twilio 帐户上的号码,我只有一个测试帐户,所以我想我可以使用这个号码发送测试 SMS。
你能告诉我这里缺少什么吗?如何从 Twilio 发送测试短信?我无法从试用帐户发送消息?
例外:
【问题讨论】:
标签: twilio