cURL
# Persist the key first. Reuse it only to inspect an uncertain result.
curl -X POST "https://api.superskope.com/api/v1/groups/120000000000@g.us/actions" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"add","participants":["910000000002@c.us"]}'import { SuperSkope } from '@superskope/sdk';
const client = new SuperSkope({
origin: 'https://api.superskope.com',
apiKey: process.env.SUPERSKOPE_API_KEY,
});
// Persist the key first. Reuse it only to inspect an uncertain result.
const idempotencyKey = process.env.IDEMPOTENCY_KEY;
const result = await client.groupAction('120000000000@g.us', { action: 'add', participants: ['910000000002@c.us'] }, { idempotencyKey });
console.log(result);
import os
import requests
response = requests.post(
"https://api.superskope.com/api/v1/groups/120000000000@g.us/actions",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}", "Idempotency-Key": os.environ["IDEMPOTENCY_KEY"]},
json={"action": "add", "participants": ["910000000002@c.us"]},
timeout=40,
)
print(response.status_code, response.json())
{
"requestId": "<string>",
"groupId": "<string>",
"action": "<string>",
"state": "completed",
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Groups
Run a group action
Apply an explicit granular group action, including leave. Granular scope plus an exact selected chat or currently authorized groups:created grant required. add/remove/promote/demote need groups:members; subject/description/picture/remove-picture need groups:profile; messages-admin-only/info-admin-only need groups:permissions; leave needs groups:leave. Legacy groups:write grants none of these actions. Current account, membership, admin and target safeguards remain authoritative. Leave requires current linked-number membership, without requiring admin; it may prevent subsequent reads. Unknown results never retry.
cURL
# Persist the key first. Reuse it only to inspect an uncertain result.
curl -X POST "https://api.superskope.com/api/v1/groups/120000000000@g.us/actions" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"add","participants":["910000000002@c.us"]}'import { SuperSkope } from '@superskope/sdk';
const client = new SuperSkope({
origin: 'https://api.superskope.com',
apiKey: process.env.SUPERSKOPE_API_KEY,
});
// Persist the key first. Reuse it only to inspect an uncertain result.
const idempotencyKey = process.env.IDEMPOTENCY_KEY;
const result = await client.groupAction('120000000000@g.us', { action: 'add', participants: ['910000000002@c.us'] }, { idempotencyKey });
console.log(result);
import os
import requests
response = requests.post(
"https://api.superskope.com/api/v1/groups/120000000000@g.us/actions",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}", "Idempotency-Key": os.environ["IDEMPOTENCY_KEY"]},
json={"action": "add", "participants": ["910000000002@c.us"]},
timeout=40,
)
print(response.status_code, response.json())
{
"requestId": "<string>",
"groupId": "<string>",
"action": "<string>",
"state": "completed",
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json