Twilio配置文件SID
我正在使用Twilio视频API。在我的node.js中,我使用了以下代码Twilio配置文件SID,twilio,twilio-api,Twilio,Twilio Api,我正在使用Twilio视频API。在我的node.js中,我使用了以下代码 var grant = new VideoGrant(); 它需要configurationProfileSid,但我找不到关于如何获取它的文档? 我认为这是一种能力象征。 但是如何使用twilio node js获得它呢? 还是有其他方法可以得到它?这里是Twilio开发者福音传道者 配置配置文件以前是必需的,但已被弃用。因此,您不再需要configurationProfileSid。不过,您可以访问特定的房间 这是
var grant = new VideoGrant();
它需要configurationProfileSid
,但我找不到关于如何获取它的文档?
我认为这是一种能力象征。
但是如何使用twilio node js获得它呢?
还是有其他方法可以得到它?这里是Twilio开发者福音传道者 配置配置文件以前是必需的,但已被弃用。因此,您不再需要
configurationProfileSid
。不过,您可以访问特定的房间
这是一个例子。重要的部分是生成令牌的路由:
app.get('/', function(request, response) {
// Create an access token which we will sign and return to the client,
// containing the grant we just created
var token = new AccessToken(
process.env.TWILIO_ACCOUNT_SID,
process.env.TWILIO_API_KEY,
process.env.TWILIO_API_SECRET
);
// Assign identity to the token
token.identity = request.query.identity || 'identity';
// Grant the access token Twilio Video capabilities
var grant = new VideoGrant();
grant.room = request.query.room;
token.addGrant(grant);
// Serialize the token to a JWT string
response.send(token.toJwt());
});
这也会有所帮助。这里是Twilio开发者福音传道者 配置配置文件以前是必需的,但已被弃用。因此,您不再需要
configurationProfileSid
。不过,您可以访问特定的房间
这是一个例子。重要的部分是生成令牌的路由:
app.get('/', function(request, response) {
// Create an access token which we will sign and return to the client,
// containing the grant we just created
var token = new AccessToken(
process.env.TWILIO_ACCOUNT_SID,
process.env.TWILIO_API_KEY,
process.env.TWILIO_API_SECRET
);
// Assign identity to the token
token.identity = request.query.identity || 'identity';
// Grant the access token Twilio Video capabilities
var grant = new VideoGrant();
grant.room = request.query.room;
token.addGrant(grant);
// Serialize the token to a JWT string
response.send(token.toJwt());
});
这也应该有帮助