Skip to content

AddGroupParticipant#

Beta version

The functionality is in beta. Features may change and may also work unstably.

The method adds a participant to a group chat.

The method uses the limits on the number of requests per second.

Request#

To add a participant, you have to execute a request at:

POST
{{apiUrl}}/waInstance{{idInstance}}/addGroupParticipant/{{apiTokenInstance}}

For apiUrl, idInstance and apiTokenInstance request parameters, refer to the Before you start section.

Request parameters#

Parameter Type Mandatory Description
chatId string Yes The identifier of the group chat
participantChatId string Yes The numeric identifier of the participant being added or a username with the @ prefix

Request body example#

{
    "chatId": "340282366841710300949128174631143137232",
    "participantChatId": "25025320"
}

Response#

Response parameters#

Field Type Description
addParticipant boolean The flag of the participant being added

Response body example#

{
    "addParticipant": true
}

The participant is already in the group

If the specified account is already a member of the group, the method responds with 200 with "addParticipant": true and does not add the participant again.

AddGroupParticipant errors#

For a list of errors common to all methods, refer to the Common errors section

HTTP code Error ID Description
400 Bad Request
Validation failed
Validation error
200 "addParticipant": false The participant is not added: Instagram rejected the request.
Possible reasons:
- the group is not found
- the participantChatId account is not found in Instagram, is deactivated or blocked
- the instance account has no rights for this action in the group

Request examples#

import requests

url = "{{apiUrl}}/waInstance{{idInstance}}/addGroupParticipant/{{apiTokenInstance}}"

payload = {
    "chatId": "340282366841710300949128174631143137232",
    "participantChatId": "25025320"
}
headers = {'Content-Type': 'application/json'}

response = requests.post(url, json=payload, headers=headers)

print(response.text.encode('utf8'))
curl --location '{{apiUrl}}/waInstance{{idInstance}}/addGroupParticipant/{{apiTokenInstance}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chatId": "340282366841710300949128174631143137232",
    "participantChatId": "25025320"
}'