WuKongIM Docs

Conventions

Addressing, JSON, identifiers, cursors, and retry rules for Product HTTP.

The following rules apply to the currently published Product HTTP operations.

Addressing and format

ConventionBehavior
Base URLLocal example: http://127.0.0.1:5001; all paths start at /
RequestPOST uses UTF-8 JSON; /route uses GET query parameters
ResponseJSON; endpoints do not share a universal envelope
UID / Channel IDStrings owned by the product
ChannelIdentified by channel_id plus channel_type
Message sequenceOrdered only within one Channel

Check HTTP status first, then parse the endpoint-specific schema. Do not force responses into a universal {data,error} type.

Identifiers and cursors

  • uid is a product identity, not a nickname, connection ID, or device ID.
  • The client view of a person Channel uses the peer UID.
  • message_seq is a per-Channel cursor; JavaScript should preserve message_idstr to avoid large-integer precision loss.
  • next_cursor is opaque. Echo it unchanged until done=true.

Retries

OperationRule
/routeBack off and retry network failures or temporary 5xx
/user/tokenRetry the same identity intent; do not mint tokens in a loop
/channel/messagesyncRetry with the same cursor and tolerate overlap with realtime delivery
Channel mutationRetry only while the product intent remains valid; treat reset and remove-all with care
/conversation/listEcho next_cursor unchanged and stop only at done=true
/conversation/retryRetry only the bounded unresolved keys returned by the API

These operations define no universal Idempotency-Key. See Authentication & Security for security requirements and Error Responses for failure classification.

On this page