Commands › Avatars & friends
friendship_offer_accept
Answer a friendship offer
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "friendship_offer_accept",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"avatar_uuid": "a2e76fcd-9360-4f6d-a924-000000000000",
"session_id": "e9a8b7c6-d5e4-4f3a-8b2c-1d0e9f8a7b6c",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
avatar_uuidUUID | yes | avatar_uuid from the offer_friendship webhook event. Also accepted as: fromAgentId |
session_idUUID | yes | session_id from the same event. Also accepted as: sessionId |
acceptflag | no | 1 to accept; anything else declines. Default: 1 |
Example response
{
"success": true,
"result": "OK",
"resulttext": "Friendship accepted"
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- Send accept as 1. true or a JSON true declines.