我无法从美国twilio号码发送短信到阿联酋twilio号码。此外,在地理设置中,发送短信到阿联酋号码是启用的。
我在这里粘贴代码:
const accountSid = '<account-sid>';
const authToken = '<auth-token>';
const client = require('twilio')(accountSid, authToken);
client.m
.create({
body: 'This is the ship that made the Kessel Run in fourteen parsecs?',
from: '<us-number>', // example: +12345678901 country code is +1
to: '<uae-number>' // example: '+971123456789' country code is +971 (also i tried different uae numbers, didn't work)
})
.then(message => console.log(message.sid)).catch(error => console.log(error.message));
字符串
我收到错误文本:Message cannot be sent with the current combination of 'To' (+97112345XXXX) and/or 'From' (+12345678901) parameters
但是如果我用相同的from
和to
参数点击twilio语音调用API,它就像一个魅力。见下面的例子:
client.calls
.create({
twiml: '<Response><Say>Hello, this is a test voice call from Twilio.</Say></Response>',
from: '<us-number>', // same us number
to: '<uae-number>', // same uae number,
})
.then(call => console.log(`Call SID: ${call.sid}`))
.catch(error => console.error(`Error making voice call: ${error.message}`));
型
它将成功返回一个调用SID。
我很不知道这里的信息有什么问题,任何人都面临着类似的问题,同时我已经发送支持twilio和等待他们的答复,因为小时!
1条答案
按热度按时间hlswsv351#
从Twilio支持得到解决方案,我必须注册阿联酋的字母数字发件人ID:https://support.twilio.com/hc/en-us/articles/360046382293-Documents-Required-and-Instructions-to-Register-Your-Alphanumeric-Sender-ID-in-UAE