Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Agora Dynamic Key expired, onTokenExpiredDidExpire not firing

Tags:

agora.io

I'm setting up authentication with tokens in my app but running into the DYNAMIC_KEY_EXPIRED issue that locked me out of all Agora services.

I produce a new token via the RtcTokenBuilder.buildTokenWithUid provided in the docs and I'm trying to renew the token but I don't know where to put the renewToken(TOKEN_STRING) function after it has expired.

The client.onTokenExpiredDidExpire watcher is not firing at all and I'm assuming that's the issue but even putting renewToken(TOKEN_STRING) in onFailure callback of client.join I get an error saying I can't call renewToken before the user joins.

Help please!!!!!

like image 811
bvergara87 Avatar asked Sep 15 '25 06:09

bvergara87


1 Answers

The solution was to make sure your UID in token generation is an integer, string UIDs cause some undefined behavior in the SDK.

like image 56
bvergara87 Avatar answered Sep 18 '25 11:09

bvergara87