If you want to associate friends with your users, you must handle friend management in your app.Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-docs-android-v6-beta2.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Once two users are friends (i.e. they have accepted each other as friends), then you can associate them as friends in CometChat.
Available operations
| Method | Endpoint | Description |
|---|---|---|
| POST | /users/{uid}/friends | Add friends for a user |
| GET | /users/{uid}/friends | List all friends of a user |
| DELETE | /users/{uid}/friends | Remove friends from a user |
Friend properties
The following table lists the properties that the Friends API supports| Parameters | Type | Description |
|---|---|---|
| accepted | array of strings | (optional) Indicates an array of UIDs that are to be made friends. Maximum of 25 users can be passed in the accepted array. |
Error handling
| Error Code | Description |
|---|---|
AUTH_ERR_EMPTY_APIKEY | API key is missing from the request headers |
AUTH_ERR_APIKEY_NOT_FOUND | The provided API key is invalid |
ERR_UID_NOT_FOUND | The specified user UID does not exist |