如何在twilio client sdk

时间:2017-05-18 11:17:17

标签: android timezone twilio

我正在使用服务器代码生成功能令牌

   <?php
include "vendor/autoload.php";

use Twilio\Jwt\ClientToken;

// put your Twilio API credentials here
$accountSid = 'AC5fb1760ee03546b8747b7ff9c10c0c85';
$authToken  = 'your_auth_token';
$appSid = 'APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';

$capability = new ClientToken($accountSid, $authToken);
$capability->allowClientOutgoing($appSid);
$capability->allowClientIncoming('jenny');
$token = $capability->generateToken();

echo $token;

并立即显示

  

JWT令牌已过期(31205)

运行android客户端sdk时,我搜索了 twilio ,说明

  

确保您的服务器时钟设置正确..   https://support.twilio.com/hc/en-us/articles/223180948-Capability-token-is-expired

现在如何在Android客户端设置时区?请告诉我们如何做到这一点或如何制作正确的令牌?

0 个答案:

没有答案