Groups · Developer account
setPrivacyMode
Set a bot's privacy mode in a group
This method authenticates with your developer account. The easiest way to call it is the dashboard, which signs the request for you. Direct calls need a dashboard session cookie.
Sets group privacy mode for a bot that is already in the group. Privacy mode controls whether the bot sees all group messages or only ones addressed to it (enforced in bot-ingest).
Request
curl https://api.sprintelex.com/setPrivacyMode \
# authenticated with your dashboard session \
-H "Content-Type: application/json" \
-d '{"bot_id":"<bot-id>","group_id":"<group-id>","privacy_mode":true}'Parameters
| Name | Type | Required | Rules |
|---|---|---|---|
| bot_id | string | Yes | - |
| group_id | string | Yes | - |
| privacy_mode | boolean | Yes | must be a boolean, not a truthy string |
Response
{ ok: true, result: { group_id, privacy_mode } }Rate limit: none in code
Errors
| Status | Error | When |
|---|---|---|
| 400 | bot_id and group_id are required | either missing |
| 400 | privacy_mode must be true or false | not a boolean |
| 404 | bot not found | no such bot, not owned by caller, or deleted |
| 404 | bot is not in that group | no group_bots row for this bot+group |