logo
In-app Chat
On this page

Callback on group joined


Overview

With this callback, you can receive the callback on the group joined by the user in real time, and view the information of the group joined by the user.

Callback description

  • Request method: POST.
    Note

    The callback data format is JSON, and you need to perform UrlDecode decoding on it.

  • Request URL: The corresponding callback endpoint set in the ZEGOCLOUD Admin Console
  • Protocol: HTTPS/HTTP. HTTPS is recommended.

Callback parameters

Common parameterTypeDescription
appidStringThe unique identifier of the App.
eventStringThe callback event. The return value of this callback is group_destroy.
timestampIntThe server time in Unix timestamp when the group is destroyed.
nonceStringA random number, used to calculate the signature.
signatureStringThe verification string. For details, see Authenticating server-to-server callbacks.
ParametersTypeDescription
group_idStringThe group ID.
operator_accountStringThe user ID of the group joiner.
  • When join_type is Apply, this parameter is invalid;
  • When join_type is Invited, this parameter is the user ID of the inviter.
join_typeStringThe way to join the group:
  • Apply: The user joins the group through application.
  • Invited: The user joins the group through invitation.
new_user_idsArraysThe user IDs of the group members when the user joins the group.

Sample code

Untitled
{
    "appid" : "1",
    "event" : "Apply_join_group",
    "group_id" : "1",
    "nonce": "350176",
    "signature": "signature",
    "operator_account" : "userA",
    "join_type" : "Apply",
    "new_user_ids" : ["Tony","Jenny"],
    "timestamp" : "1499676978"
}
1
Copied!

Return codes

A status code of 2XX (such as 200) indicates success, and other responses indicate failure.

Callback retry policy

If the ZEGOCLOUD server does not receive a response, or the HTTP status code received by the ZEGOCLOUD server is not 2xx (such as 200), it will retry with intervals of 2s, 4s, 8s, 16s, and 32s respectively. If the retry still fails after an interval of 32s, it will no longer retry.

Previous

Group created

Next

Group left