Use Limits

Last updated: 2020-03-13 15:37:56

PDF

Limits on the API Calling Frequency

Group system

API Backend Call Limit Notes
Create a group 100 requests/sec per app The daily net increase cap is 10,000 per app. To increase the limit, submit a ticket to apply. A single app can have up to 100 million groups, but you need to pay fees when the number exceeds 100,000. For more information on pricing, see Pricing.
Add a group member 100 requests/sec per app A maximum of 100 members can be added at a time. A single user can join up to 1,000 groups. For more information, see Pricing.
Delete a group member 100 requests/sec per app Supports deleting up to 500 members in one request.
Modify a group member’s profile 100 requests/sec per app -
Obtain groups that a user has joined 100 requests/sec per app If a user has joined more than 5,000 groups, only the first 5,000 groups will be pulled.
Query a user’s role in the group 100 requests/sec per app Supports querying up to 500 accounts in one request.
Batch muting 100 requests/sec per app Supports muting up to 500 accounts in one request.
Batch unmuting 100 requests/sec per app Supports unmuting up to 500 accounts in one request.
Send a common message 100 requests/sec per app The default sending frequency of a single group is limited to 40 messages per second, and the length of a single message is limited to 9,000 bytes. Note: if two messages sent within 5 minutes from the same sender have the same random value (the value of the Random parameter), the later message will be discarded as a duplicate message.
Send a system notification 100 requests/sec per app -
Import group messages 100 requests/sec per app A maximum of 20 messages can be imported at a time. Messages must be imported in ascending order by timestamp. The timestamps of imported messages must be earlier than the current time and later than the group creation time. Otherwise, the import fails.
Import group members 100 requests/sec per app Supports importing up to 500 members in one request. AVChatRoom and BChatRoom groups do not support importing members.
Pull roaming group messages 100 requests/sec per app AVChatRoom and BChatRoom groups do not support roaming messages. Groups of other types support roaming messages for the last 7 days by default.
Obtain all groups in the app 100 requests/sec per app -
Obtain the group profile 100 requests/sec per app -
Obtain a group member’s details 100 requests/sec per app -
Modify the basic information of a group 100 requests/sec per app -
Dismiss a group 100 requests/sec per app -
Obtain the list of muted group members 100 requests/sec per app -
Transfer a group 100 requests/sec per app -
Import the basic information of a group 100 requests/sec per app -
Set the unread count for group members 100 requests/sec per app -
Delete messages sent by a specified user 100 requests/sec per app -
Set global muting 100 requests/sec per app -
Query global muting 100 requests/sec per app -
Query custom dirty words for an app 100 requests/sec per app -
Add custom dirty words for an app 100 requests/sec per app The total number of custom dirty words cannot exceed 5,000.
Delete custom dirty words for an app 100 requests/sec per app -

Profile system

API Backend Call Limit Notes
Set the profile 100 requests/sec per app Profiles support standard fields and custom fields. The keywords of custom fields must consist of alphabetic characters with a length no greater than 8 bytes. The length of the value of a custom field cannot exceed 500 bytes.
Pull the profile 100 requests/sec per app -

Relationship chain system

API Backend Call Limit Notes
Pull recent contacts - Currently, up to 100 recent contacts can be saved for an ordinary user.
### Add a friend 100 requests/sec per app A single user can have up to 3,000 friends, 32 friend groups, and 100 pending friend requests. The length of a friend group name cannot exceed 30 bytes, while that of friend remarks cannot exceed 96 bytes.
Blacklist a user 100 requests/sec per app Currently, a single user can blacklist up to 1,000 users.
Import friends 100 requests/sec per app Batch import supports importing up to 1,000 friends at a time.
Delete a friend 100 requests/sec per app -
Delete all friends 100 requests/sec per app -
Verify friends 100 requests/sec per app -
Pull friends 100 requests/sec per app -
Remove a user from the blacklist 100 requests/sec per app -
Pull the blacklist 100 requests/sec per app -
Verify the blacklist 100 requests/sec per app -

One-to-one chat message system

API Backend Call Limit Notes
Send a one-to-one chat message 100 requests/sec per app We recommend that the sending frequency between accounts not exceed 10 messages per second. When this limit is exceeded, all online messages are delivered. For offline messages, only 10 messages are stored per second, and additional messages will be discarded. The length of a single message cannot exceed 9,000 bytes.
Batch send one-to-one chat messages 100 requests/sec per app Supports sending messages to up to 500 users at a time. The length of a single message cannot exceed 9,000 bytes.
Import one-to-one chat messages 100 requests/sec per app -

Account system

API Backend Call Limit Notes
Obtain a user’s online state 100 requests/sec per app Supports querying the state of up to 500 users.
UserSig expiration API 1,000 requests/sec per app -
Import a single account 1,000 requests/sec per app The length of a username cannot exceed 32 bytes.
Batch import accounts 10 requests/sec per app Supports importing up to 100 usernames at a time. The length of a username cannot exceed 32 bytes.

Others

API Backend Call Limit
RESTful APIs
  • Verify accounts, delete an account, and obtain all groups in an app: 100 requests/sec
  • Other APIs: 200 requests/sec
  • Limits on Features

    Feature Limitation Type Description
    Message content Content length For one-to-one messages and group messages, the length of a single message cannot exceed 8,000 bytes. Messages longer than 8,000 bytes will be discarded by the system.
    Sending a file File size For file messages, the size of a single file cannot exceed 28 MB for SDKs and 20 MB for WebSDKs.
    System message Quantity and retention period A maximum of 100 messages are retained for up to 7 days.
    Multi-device login Online mode Currently, four login modes are supported: single-client login (Windows, web, and Android or iOS single-client login), dual-client login (concurrent Windows, Android or iOS single-client login, and web single-client login is allowed), triple-client login (concurrent Android or iOS single-client login, Windows single-client login, and web single-client login is allowed), multi-client login (concurrent Windows, web, and Android or iOS single-client login, or any combination of them is allowed.) You can change the mode in the IM console.
    UserID Naming restriction The length of a user account name cannot exceed 32 bytes. The name only supports letters and numbers, but does not support special characters.
    UserSig Validity period This is used as the user password. Signatures generated by the default API of the IM backend SDK are valid for 180 days.
    One-to-one chat/Group chat message Message roaming period Currently, message roaming is only available to Private, Public, and ChatRoom groups, with messages retained for 7 days by default. If you need a longer retention period, change the message roaming period in the IM console. Increasing the message roaming period is a value-added service. For more information on pricing, see Pricing.
    Group profile Profile content restriction The length of a group name cannot exceed 30 bytes, that of a group introduction cannot exceed 240 bytes, that of a group announcement cannot exceed 300 bytes, that of a group profile photo URL cannot exceed 100 bytes, and that of a group contact card cannot exceed 50 bytes.
    Group member Number of members Maximum number of group members: Private: 200, Public: 2,000, ChatRoom: 10,000, AVChatRoom and BChatRoom: no limit.
    Custom group ID ID naming restriction Custom group IDs must be composed of ASCII characters (0x20-0x7e) and cannot exceed 48 bytes in length. In addition, they cannot begin with @TGS# to avoid confusion with default group IDs assigned by IM.
    Custom fields of a group Field restriction A group supports up to 20 custom fields. The Key field is of the String type with a maximum length of 16 bytes. The group name can only contain uppercase and lowercase letters, numbers, and underscores. The Value field is a user-defined buffer and can be binary. The maximum length of Value for groups is 512 bytes.
    Custom fields of group members Field restriction A group member supports up to 5 custom fields. The Key field is of the String type with a maximum length of 16 bytes. Its name can only contain uppercase and lowercase letters, numbers, and underscores. The Value field is a user-defined buffer and can be binary. The maximum length of Value for group members is 64 bytes.