nimeet Docs
中文

Token and uid mapping

Token issuance, renewal, verification and uid mapping.

Generated from the public REST API definitions

Version v1.1.0 · Updated 2026-10-26 · revision 1

Group overview

Generated at build time from the public REST API definition: tag tokens, 5 operations (out of 189). For authentication, envelope and pagination conventions see REST API overview.

MethodPathSummary
GET/v1/meta/privilegesPrivilege catalogue per role
POST/v1/tokensIssue a channel token
POST/v1/tokens/renewRenew a token
GET/v1/tokens/verifyVerify a token and return its payload
POST/v1/uids:resolveResolve rtc uids to IM user ids

Operation details

GET /v1/meta/privileges

Privilege catalogue per role

Authentication: project credentials (Base64 of customerId:customerSecret)

Response

Status codesDescription / schema
200privilege catalogue per role — object{ privileges, roles }

Example call

bash
curl -s -X GET "$NIMEET_API_BASE/v1/meta/privileges" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"

POST /v1/tokens

Issue a channel token

getRTCTokenInfo implementation for the IM RTC Provider. Wildcard tokens (channelName: "*" or wildcard: true) are allowed; uid may be supplied explicitly or derived from userId.

Authentication: project credentials (Base64 of customerId:customerSecret)

Request body

FieldTypeRequiredDescription
channelNamestring
channelstringalias of channelName
uidinteger1..2147483647
userIdstringIM user id; when supplied the rtcUid is derived and bound
roleenum(host | audience)default "host"
ttlSecondsinteger60..86400
wildcardboolean
json
{
  "channelName": "weekly-sync",
  "uid": 10001,
  "role": "host",
  "ttlSeconds": 3600
}

Response

Status codesDescription / schema
200issued — TokenIssueResponse
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
415Content-Type must be application/json — Error

Example call

bash
curl -s -X POST "$NIMEET_API_BASE/v1/tokens" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
  -H "Content-Type: application/json" \
  -d '{"channelName":"weekly-sync","uid":10001,"role":"host","ttlSeconds":3600}'

POST /v1/tokens/renew

Renew a token

Accepts a token within its renewal grace window and returns a fresh token with the same channel, uid and (non-escalated) privileges.

Authentication: project credentials (Base64 of customerId:customerSecret)

Request body

FieldTypeRequiredDescription
tokenstringis
json
{
  "token": "$RTC_TOKEN"
}

Response

Status codesDescription / schema
200renewed — TokenIssueResponse
400Invalid parameter — Error
401Missing/invalid credentials — Error

Example call

bash
curl -s -X POST "$NIMEET_API_BASE/v1/tokens/renew" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
  -H "Content-Type: application/json" \
  -d '{"token":"$RTC_TOKEN"}'

GET /v1/tokens/verify

Verify a token and return its payload

Authentication: project credentials (Base64 of customerId:customerSecret)

Parameters

NameLocationRequiredTypeDescription
tokenqueryisstring
channelNamequerystring

Response

Status codesDescription / schema
200valid — object{ valid, payload }
400Invalid parameter — Error
401Missing/invalid credentials — Error

Example call

bash
curl -s -X GET "$NIMEET_API_BASE/v1/tokens/verify?token=%24RTC_TOKEN&channelName=weekly-sync" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"

POST /v1/uids:resolve

Resolve rtc uids to IM user ids

getUserIdsWithRTCUids implementation. Partial results are returned; unknown uids are omitted.

Authentication: project credentials (Base64 of customerId:customerSecret)

Request body

FieldTypeRequiredDescription
rtcUidsarray<integer>isup to 200 items
channelNamestring
json
{
  "rtcUids": [
    10001,
    10002,
    99999
  ],
  "channelName": "weekly-sync"
}

Response

Status codesDescription / schema
200mapping keyed by uid — object
400Invalid parameter — Error
401Missing/invalid credentials — Error

Example call

bash
curl -s -X POST "$NIMEET_API_BASE/v1/uids:resolve" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
  -H "Content-Type: application/json" \
  -d '{"rtcUids":[10001,10002,99999],"channelName":"weekly-sync"}'

Schemas used by this group

Error — object{ code, message, reason, sdkCode, details }
FieldTypeRequiredDescription
codestringisstable machine code, see errors.json
messagestringis
reasonstring
sdkCodeintegerAgora-aligned client error number
detailsobject
TokenIssueResponse — object
FieldTypeRequiredDescription
appIdstringis
channelNamestringis
rtcTokenstringis
rtcUidintegeris1..2147483647
roleenum(host | audience)is
privilegesarray<string>is
controlTokenstringOpaque control-plane token for REST diagnostics/renewal. TokenIssueResult.controlToken is optional; toResult() always sets it.
mediaRoomstringSFU room name when the media adapter namespaces by App ID (TokenIssueResult.mediaRoom).
expireAtstringisformat date-time
privilegeExpireAtstringisformat date-time

Generated by the documentation build pipeline · 2026-10-31 01:24:02 UTC · Documentation center v1.1.0.

Content follows the public API definitions.

ni-meet is a self-hosted RTC PaaS with a LiveKit-based media plane (Apache-2.0) and an Agora-compatible API.