Closed MetaSeth closed 10 months ago
The doc at https://docs.agora.io/en/video-calling/develop/integrate-token-generation?platform=web#implement-token-generation seems to be working fine for me. Could you share steps to reproduce or your code? @saudsami there was an unrelated issue that I have fixed in https://github.com/AgoraIO/Doc-Source-Private/pull/818
Fixed by https://github.com/AgoraIO/Doc-Source-Private/pull/870. @MetaSeth this will updated in the next publish. For your use, you may use the correct code:
const tokenA = RtcTokenBuilder.buildTokenWithUid(
appId,
appCertificate,
channelName,
uid,
role,
expirationTimeInSeconds,
privilegeExpiredTs
);
const tokenB = RtcTokenBuilder.buildTokenWithUserAccount(
appId,
appCertificate,
channelName,
userAccount,
role,
privilegeExpiredTs);
Platform
Web
Platform details
I'm only using the web product, but i guess it could be on others platform too.
Product
Video Calling
Product details
RtcTokenBuilder.buildTokenWithUid signature
Business Case
Simpler for new users
Subject Matter Expert
RtcTokenBuilder.buildTokenWithUid()
expects 6 arguments, but only 5 are provided in the documentation. Thetoken_expire
argument is missing in the example.Should be something like that:
Documentation Link
https://docs.agora.io/en/video-calling/develop/integrate-token-generation?platform=web#implement-token-generation
Scope
No response
Acceptance Criteria
The documentation update should be technicaly accurate.
Additional Information
No response
Edit: I made a mistake when describing the error. It was
Expected 7 arguments, but got 6.ts(2554) index.d.ts(26, 159): An argument for 'privilege_expire' was not provided.
I have posted an example.