RemoveAdmin#
The method removes a participant from group chat administration rights.
Request#
To remove a participant from group chat administration rights, you have to execute a request at:
POST https://api.green-api.com/waInstance{{idInstance}}/removeAdmin/{{apiTokenInstance}}
For idInstance
and apiTokenInstance
request parameters, refer to Before you start section.
Request parameters#
Parameter | Type | Mandatory | Description |
---|---|---|---|
groupId | string | Yes | Group chat Id |
participantChatId | string | Yes | Id of a group participant, who you'd like to remove from group administration rights |
Request body example#
Removing a participant from group administration rights:
{
"groupId": "11001234567-1587570015@g.us",
"participantChatId": "79001234565@c.us"
}
Response#
Response parameters#
Parameter | Type | Description |
---|---|---|
removeAdmin | boolean | Flag of removing a group participant from administration rights |
Response body example#
{
"removeAdmin": true
}
RemoveAdmin errors#
For a list of errors common to all methods, refer to Common errors section
Python request example#
import requests
url = "https://api.green-api.com/waInstance{{idInstance}}/removeAdmin/{{apiTokenInstance}}"
payload = "{\r\n \"groupId\": \"11001234567-1587570015@g.us\",\r\n \"participantChatId\": \"79001234568@c.us\",\r\n}"
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload)
print(response.text.encode('utf8'))