我正在使用twilio-node库。
以下代码运行并给出区域in1
的回合凭证:
const client = require('twilio')(accountSid, authToken);
const get_ice_servers = (req, res) => {
client.tokens.create().then(token => {
const ice_servers = token.iceServers ? token.iceServers : []
res.json({
status: true,
ice_servers: ice_servers
});
});
}
但是指定如下所示的区域不会提供任何转弯凭证:
const client = require('twilio')(accountSid, authToken, {region: 'sg1'});