Skip to main content

API usage restrictions

This page provides a brief overview of the restrictions of the Agora Signaling SDK, including API call limit, string size, encoding, and more.

API call limit

Unless otherwise specified below, limit the API call frequency by a single client to 20 calls per second. If the number of calls per second exceeds 20, some calls are ignored by the SDK. If you need to call more APIs per second, contact rtm@agora.io.

General

ItemSoft limitHard limitComments
Number of projects in an account1000N/ATo change the limit, contact rtm@agora.io.
Number of client instances11Attempts to create multiple instances fail.
Number of message channels per app IDUnlimitedN/AChannel resources are public, users can take them as needed.
Number of stream channels per app IDUnlimitedN/AChannel resources are public, users can take them as needed.
User ID length64 ASCII characters64 ASCII charactersExceeding the soft limit produces an error.

Message channel

ItemSoft limitHard limitComments
Number of messages per second in a channel30 messages/sec60 messages/secExceeding the soft limit produces an error. To change the limit, contact rtm@agora.io.
Number of subscribers per channelUnlimitedN/A
Number of publishers per channelUnlimitedN/A
Number of subscribed channels per client50N/AExceeding the soft limit produces an error.
Message packet size32 KB32 KBExceeding the soft limit produces an error. To change the limit, contact rtm@agora.io.
Channel name length64 ASCII characters64 ASCII charactersExceeding the soft limit produces an error.
Custom message type length32 ASCII characters32 ASCII charactersExceeding the soft limit produces an error.

Stream channel

ItemSoft limitHard limitComments
Number of created channels per clientUnlimitedN/A
Number of joined channels per client100N/AExceeding the soft limit produces an error. To change the limit, contact rtm@agora.io.
Number of users per channel1000N/AExceeding the soft limit produces an error. To change the limit, contact rtm@agora.io.
Number of topics per channelUnlimitedN/A
Channel name length64 ASCII characters64 ASCII charactersExceeding the soft limit produces an error.

Topic

ItemSoft limitHard limitComments
Number of topics joined by a client in a channel88Exceeding the soft limit produces an error.
Number of messages published by a client in a topic per second120 messages/sec200 messages/secExceeding the soft limit produces an error. To change the limit, contact rtm@agora.io.
Number of topics subscribed to by a client in a channel5050Exceeding the soft limit produces an error.
Number of users subscribed to a topic by a client6464A single client can subscribe up to 64 user IDs to a single topic. Exceeding the soft limit produces an error.
Number of publishers in a topicUnlimitedN/A
Topic name length8 ASCII characters8 ASCII charactersThe topic name length will be extended to 64 ASCII characters in future releases.
Message packet size32 KB32 KBExceeding the soft limit produces an error. To change the limit, contact rtm@agora.io.
Custom message type length32 ASCII characters32 ASCII charactersExceeding the soft limit produces an error.

Presence

ItemSoft limitHard limitComments
Presence timeout10 seconds - 300 seconds. Defaults to 300 seconds.N/AWhen the set timeout value is exceeded, the SDK matches the closest boundary value. For example, if you set presence timeout to 400 seconds, the actual application time is 300 seconds. To change the limit, contact rtm@agora.io.
Number of temporary user state key/value pairs32 pairs32 pairsExceeding the soft limit produces an error.
Number of temporary user states cached before joining the channel100100Exceeding the soft limit produces an error.

Storage

ItemSoft limitHard limitComments
Metadata item key length32 ASCII charactersN/A
Number of metadata sets per user or channel11Each channel and each user can only have one set of channel or user metadata, respectively.
Number of items per channel metadata or user metadata setUnlimitedN/A
Storage space per channel or user metadata set64KBN/ATo change the limit, contact rtm@agora.io.
Storage space per metadata item64KBN/ATo change the limit, contact rtm@agora.io.
Channel metadata API call frequency by a single client10 times/sec20 times/secTo change the limit, contact rtm@agora.io.
User metadata API call frequency by a single client10 times/sec20 times/secTo change the limit, contact rtm@agora.io.
Number of channel metadata sets per app ID1 millionN/A
Number of user metadata sets per app ID1 millionN/ATo change the limit, contact rtm@agora.io.

Lock

ItemSoft limitHard limitComments
Number of locks per channel32N/ATo change the limit, contact rtm@agora.io.
Number of locked locks per clientUnlimitedN/A
Lock TTL (Time to live)10 seconds - 300 seconds10 seconds - 300 secondsWhen a user leaves a channel or disconnects, the lock held by that user is automatically released after the set time. When the set value is exceeded, the SDK matches the closest boundary value. For example, if you set lock TTL to 400 seconds, the actual application time is 300 seconds.
Lock length64 ASCII characters64 ASCII charactersExceeding the soft limit produces an error.
Number of locks per app ID1 millionN/AExceeding the soft limit produces an error. To change the limit, contact rtm@agora.io.
Lock acquisition API call frequency10 times/secN/A

String size

The maximum size of the response in a call invitation is 8 KB.

Unicode support

Supports channel and peer-to-peer messages, invitation content, and invitation response in UTF-8 only.

Call limit

The call limit is for one RtmClient instance. If an operation corresponds to multiple methods, the number of the method calls of an operation equals the sum of the method calls of all corresponding methods in a specific time frame.

You can increase the call limit of an API by creating multiple RtmClient instances.
OperationMethodCall limit
Log in the Signalinglogin2 calls per second
Retrieve member count of specified channel(s)getChannelMemberCount1 call per second
Join a different channel each timejoin50 calls every 3 seconds
Join the same channel each timejoin2 calls every 5 seconds
Send messages
  • sendMessageToPeer
  • sendMessageToPeer
  • sendMessage
  • sendMessage
  • 180 calls every three seconds
    Retrieve a member list of the channelgetMembers5 calls every 2 seconds
    Renew the tokenRtmClient.renewToken2 calls per second
    Query the online status of the specified usersqueryPeersOnlineStatus10 calls every 5 seconds
    Set user attributes
  • setLocalUserAttributes
  • addOrUpdateLocalUserAttributes
  • deleteLocalUserAttributesByKeys
  • clearLocalUserAttributes
  • 10 calls every 5 seconds
    Get user attributes
  • getUserAttributes
  • getUserAttributesByKeys
  • 40 calls every 5 seconds
    Set channel attributes
  • setChannelAttributes
  • addOrUpdateChannelAttributes
  • deleteChannelAttributesByKeys
  • clearChannelAttributes
  • 10 calls every 5 seconds
    Get channel attributes
  • getChannelAttributes
  • getChannelAttributesByKeys
  • 10 calls every 5 seconds
    Subscribes to the online status of the specified user(s)subscribePeersOnlineStatus10 calls every 5 seconds
    Unsubscribes from the online status of the specified user(s)unsubscribePeersOnlineStatus10 calls every 5 seconds
    Gets a list of the peers, to whose specific status you have subscribed.queryPeersBySubscriptionOption10 calls every 5 seconds

    String size

    Encoding

    Miscellaneous

    • Notifications of a member joining or leaving the channel are automatically disabled when the number of channel members exceeds 512.
    • The current version supports querying the online status of up to 256 users.
    • You can subscribe to the online status of up to 512 users in one method call, and you can subscribe to the online status of up to 512 users.
    • Attribute settings in one user attribute operation must not exceed 16 KB in size. Attribute settings in one channel attribute operation must not exceed 32 KB in size. Each attribute (key/value pair) must not exceed 8 KB in size. You must not set over 32 key/value pairs for one attribute operation.
    • Each file or image you upload to the Agora server stays for seven days. The corresponding media ID also stays valid for seven days.
    • Each file or image to upload must not exceed 30 MB in size.
    • Each client instance can only support up to nine upload and download processes at the same time.

    Signaling