【问题标题】:twilio access token grants for voice documentation用于语音文档的 twilio 访问令牌授予
【发布时间】:2020-07-06 07:49:10
【问题描述】:

我有一个运行良好的基于​​浏览器的 twilio 手机应用程序,但为了更好的安全性,我们现在正在集成访问令牌。但是我们在任何地方都找不到任何关于赠款的文件。我们在后端自己构建所有内容,因此我们专门寻找需要放入 JSON 中的变量,用于接收调用和发送调用。

我已经问过 Twilio,但现在是星期天。当他们返回响应时,如果它首先出现,并且如果它有效,我会将它放在这里以帮助其他可能像我们一样寻找这个的人。

即。这是 JSON 负载:

{"sub":"AC*****","nbf":1578251940,"iss":"SK*****","exp":1578338340,"iat":1578252060,"grants ":{"identity":"ID_whatever","voice":{"service_sid":"AP*****"}},"jti":"SK*****"}

感谢任何帮助。

【问题讨论】:

标签: twilio token voice


【解决方案1】:

Twilio 已使用有效负载模板进行响应,以防其他人需要它。

{
  // API key SID concatenated with current timestamp
  "jti": "SK...-1578329486",
  // API key SID
  "iss": "SK...",
  // account SID
  "sub": "AC...",
  // expiration timesetamp
  "exp": 1578333086,
  "grants": {
    // Client name 
    "identity": "alice",
    "voice": {
      "incoming": {
      // if incoming connections are allowed
      "allow": true
    },
    "outgoing": {
      // if outgoing connections are allowed, the application SID
      "application_sid": "AP..."
    } 
  }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-06
    • 2018-01-13
    • 2020-09-13
    • 2020-03-31
    • 2022-08-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多