I'm trying to generate a session for every group I have been creating for voice-chat, but it's not being generated in aws server while on my local server it is working.
Here is my code:
$ApiKey = XXXXXXXX; // YOUR API KEY
$ApiSecret = "xxxxxxxxxxxxxxxx";
$opentok = new OpenTok($ApiKey, $ApiSecret);
$session = $opentok->createSession(array('mediaMode' =>
MediaMode::ROUTED));
$session_id = $session->getSessionId();
Here is my error logcat:
TokBox Developer Evangelist here.
Each request that you make to the OpenTok REST API must be authenticated with a JWT token and if you're using the OpenTok PHP SDK, it will handle this for you.
However, we've seen this issue in the past where the server clocks are out of sync and the JWT token is expiring too soon. To fix the clock issue, please check out the following resources that have resolved issues in the past:
I also urge you to delete this API Key and API Secret combination and use a different set since you've shared your API Secret publicly.