AppID and AppKey
After you create an app, you get a pair of credentials with completely different responsibilities:Issuance flow
The key is step 2: SRTC doesn’t manage your user system. Who is allowed into this channel and what identity they have once inside are entirely decided by your backend. SRTC only trusts the issued token. For endpoint details, see Server API · Get a channel join token; for the signing algorithm, see Server API overview.Choosing the uid
Theuid signed into the token is this user’s identity in the channel. Think through two rules first:
- One uid can join multiple different channels at the same time
- When the same uid joins the same channel, the later join replaces the earlier one
If what you need is meeting semantics such as “one user attending from multiple devices at once”, SMeeting has a built-in mechanism that distinguishes identities by device type, so you don’t have to build uids yourself. See Choosing SRTC or SMeeting.
Validity and invalidation
A token is bound to one session and can’t be reused after it has been used:
For the full list of error codes, see Server API · Error codes.
Related
- Key concepts—channels, users, and tracks
- Server API overview—signing algorithm and request format