Skip to content

Commit 8c0b947

Browse files
committed
Audit fixes
1 parent 7d86897 commit 8c0b947

File tree

8 files changed

+157
-108
lines changed

8 files changed

+157
-108
lines changed

calls.json

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

chat-apis.json

Lines changed: 66 additions & 66 deletions
Large diffs are not rendered by default.

data-import-apis.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@
368368
"extension": "png",
369369
"size": "350.2",
370370
"mimeType": "image/png",
371-
"url": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png"
371+
"url": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp"
372372
}
373373
],
374374
"metadata": {
@@ -384,7 +384,7 @@
384384
"senderUserDetails": {
385385
"uid": "s12",
386386
"name": "user1",
387-
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
387+
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
388388
"createdAt": "1674228536",
389389
"metadata": {
390390
"key": "value"
@@ -395,9 +395,9 @@
395395
"name": "cometchat-uid-",
396396
"type": "public",
397397
"description": "Hello group",
398-
"icon": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
398+
"icon": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
399399
"owner": "cometchat-uid-1",
400-
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
400+
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
401401
"createdAt": "1674228536",
402402
"metadata": {
403403
"key": "value"
@@ -465,7 +465,7 @@
465465
"extension": "png",
466466
"size": "350.2",
467467
"mimeType": "image/png",
468-
"url": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png"
468+
"url": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp"
469469
}
470470
],
471471
"metad2ata": {
@@ -479,7 +479,7 @@
479479
"entity": {
480480
"uid": "s12",
481481
"name": "user1",
482-
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
482+
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
483483
"metadata": {
484484
"key": "value"
485485
},
@@ -494,7 +494,7 @@
494494
"entity": {
495495
"uid": "r123",
496496
"name": "cometchat-uid-",
497-
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
497+
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
498498
"metadata": {
499499
"key": "value"
500500
},
@@ -600,7 +600,7 @@
600600
"uid1": {
601601
"uid": "uid1",
602602
"name": "uid1",
603-
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
603+
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
604604
"createdAt": "1673421419",
605605
"metadata": {
606606
"key": "value"
@@ -652,7 +652,7 @@
652652
"data": {
653653
"uid": "uid1",
654654
"name": "uid1",
655-
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
655+
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
656656
"metadata": {
657657
"key": "value"
658658
},
@@ -2519,7 +2519,7 @@
25192519
"disableAfterInteracted": true,
25202520
"action": {
25212521
"actionType": "apiAction",
2522-
"url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3/messages",
2522+
"url": "https://<appId>.api-<region>.cometchat.io/v3/messages",
25232523
"method": "POST",
25242524
"payload": {
25252525
"category": "message",

management-apis.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6227,7 +6227,7 @@
62276227
"stickerSetId": "7efe9cbd-7789-4095-ae37-88b144aaec70",
62286228
"stickerSetName": "little dyno",
62296229
"stickerSetOrder": 7,
6230-
"stickerUrl": "https://data-us.cometchat-staging.com/stickers/littledyno/litt_14.png",
6230+
"stickerUrl": "https://data-us.cometchat.io/stickers/littledyno/litt_14.png",
62316231
"id": "fb24136a-abd0-4302-866d-c754410afc20",
62326232
"enableFlag": true
62336233
}
@@ -10919,7 +10919,7 @@
1091910919
"entity": {
1092010920
"uid": "cometchat-uid-1",
1092110921
"name": "Andrew Joseph",
10922-
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
10922+
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
1092310923
"status": "offline",
1092410924
"role": "default"
1092510925
},
@@ -10929,7 +10929,7 @@
1092910929
"entity": {
1093010930
"uid": "cometchat-uid-2",
1093110931
"name": "George Alan",
10932-
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/captainamerica.png",
10932+
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp",
1093310933
"status": "offline",
1093410934
"role": "default",
1093510935
"conversationId": "cometchat-uid-1_user_cometchat-uid-2"
@@ -16264,7 +16264,7 @@
1626416264
"stickerSetId": "sticker_1234",
1626516265
"stickerSetName": "good_Sticker",
1626616266
"stickerSetOrder": 1,
16267-
"stickerUrl": "https://data-us.cometchat-staging.com/stickers/littledyno/litt_14.png"
16267+
"stickerUrl": "https://data-us.cometchat.io/stickers/littledyno/litt_14.png"
1626816268
}
1626916269
]
1627016270
},

rest-api/chat-apis.mdx

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ Welcome to CometChat's REST API documentation! This documentation provides detai
77

88
## API Resources
99

10-
| Resource | Description |
11-
| -------- | ----------- |
12-
| [Users](/rest-api/users) | Create, list, update, and delete users |
13-
| [Auth Tokens](/rest-api/auth-tokens) | Create, list, and manage user authentication tokens |
14-
| [Groups](/rest-api/groups) | Create, list, update, and delete groups |
15-
| [Group Members](/rest-api/group-members) | Add, remove, list, and manage group membership |
16-
| [Messages](/rest-api/messages) | Send, list, update, and delete messages |
17-
| [Conversations](/rest-api/conversations) | List and manage user conversations |
18-
| [Friends](/rest-api/friends) | Manage friend relationships between users |
19-
| [Blocked Users](/rest-api/blocked-users) | Block and unblock users |
20-
| [Banned Users](/rest-api/banned-users) | Ban and unban users from groups |
21-
| [Roles](/rest-api/roles) | Create and manage user roles |
22-
| [API Keys](/rest-api/api-keys) | Create and manage API keys |
23-
| [Calls](/rest-api/get-call) | Retrieve and list call records |
24-
| [RBAC](/rest-api/rbac-overview) | Configure role-based and scope-based access control |
25-
| [Restrict Features](/rest-api/restrict-features) | Restrict features per role |
26-
| [Notifications](/rest-api/notifications-apis) | Manage push and other notifications |
27-
| [Moderation](/rest-api/moderation-apis) | Moderate content and users |
28-
| [AI Agents](/rest-api/ai-agents-apis) | Configure and manage AI agents |
29-
| [Data Import](/rest-api/data-import) | Import users, groups, members, and messages in bulk |
30-
| [Metrics](/rest-api/metrics) | Retrieve app usage metrics |
10+
| Resource | Description |
11+
| ------------------------------------------------ | --------------------------------------------------- |
12+
| [Users](/rest-api/users) | Create, list, update, and delete users |
13+
| [Auth Tokens](/rest-api/auth-tokens) | Create, list, and manage user authentication tokens |
14+
| [Groups](/rest-api/groups) | Create, list, update, and delete groups |
15+
| [Group Members](/rest-api/group-members) | Add, remove, list, and manage group membership |
16+
| [Messages](/rest-api/messages) | Send, list, update, and delete messages |
17+
| [Conversations](/rest-api/conversations) | List and manage user conversations |
18+
| [Friends](/rest-api/friends) | Manage friend relationships between users |
19+
| [Blocked Users](/rest-api/blocked-users) | Block and unblock users |
20+
| [Banned Users](/rest-api/banned-users) | Ban and unban users from groups |
21+
| [Roles](/rest-api/roles) | Create and manage user roles |
22+
| [API Keys](/rest-api/api-keys) | Create and manage API keys |
23+
| [Calls](/rest-api/get-call) | Retrieve and list call records |
24+
| [RBAC](/rest-api/rbac-overview) | Configure role-based and scope-based access control |
25+
| [Restrict Features](/rest-api/restrict-features) | Restrict features per role |
26+
| [Notifications](/rest-api/notifications-apis) | Manage push and other notifications |
27+
| [Moderation](/rest-api/moderation-apis) | Moderate content and users |
28+
| [AI Agents](/rest-api/ai-agents-apis) | Configure and manage AI agents |
29+
| [Data Import](/rest-api/data-import) | Import users, groups, members, and messages in bulk |
30+
| [Metrics](/rest-api/metrics) | Retrieve app usage metrics |
3131

3232
## Introduction
3333

@@ -45,12 +45,31 @@ To get started with CometChat's REST API, you'll need to obtain your App ID, API
4545
<img src="/images/cb897cc3-ddeeda4-cometchat_dashboard_credentials.png" />
4646
</Frame>
4747

48+
## API Resources
49+
50+
| Resource | Description |
51+
| ---------------------------------------- | ---------------------------------------------------- |
52+
| [API Keys](/rest-api/api-keys) | Manage API keys for authenticating REST API requests |
53+
| [Auth Tokens](/rest-api/auth-tokens) | Create and manage user authentication tokens |
54+
| [Roles](/rest-api/roles) | Define and manage user roles and permissions |
55+
| [Users](/rest-api/users) | Create, update, delete, and list users |
56+
| [Groups](/rest-api/groups) | Create and manage groups |
57+
| [Group Members](/rest-api/group-members) | Add, remove, and manage group members |
58+
| [Messages](/rest-api/messages) | Send, receive, and manage messages |
59+
| [Conversations](/rest-api/conversations) | Manage user and group conversations |
60+
| [Blocked Users](/rest-api/blocked-users) | Block and unblock users |
61+
| [Friends](/rest-api/friends) | Manage friend relationships |
62+
| [Banned Users](/rest-api/banned-users) | Ban and unban users from groups |
63+
4864
## Authentication
4965

5066
Authentication is a crucial aspect of utilizing CometChat's REST API securely. All API requests must be accompanied by an API key to authenticate the incoming requests. CometChat employs industry-standard authentication mechanisms to ensure the security and integrity of your data.
5167

5268
<Note>
53-
The HTTP header name for authentication is **`apikey`** (all lowercase). In JSON response bodies, the API key property is returned as **`apiKey`** (camelCase). This distinction is intentional — HTTP headers are case-insensitive by specification, while JSON properties are case-sensitive.
69+
The HTTP header name for authentication is **`apikey`** (all lowercase). In
70+
JSON response bodies, the API key property is returned as **`apiKey`**
71+
(camelCase). This distinction is intentional — HTTP headers are
72+
case-insensitive by specification, while JSON properties are case-sensitive.
5473
</Note>
5574

5675
## Endpoints

rest-api/extensions-overview.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,13 @@ description: "Browse available CometChat extensions for enhanced chat functional
5959
| virus-malware-scanner | Virus Malware Scanner |
6060
| voice-transcription | Voice Transcription |
6161
| xss-filter | XSS Filter |
62+
63+
## Error Handling
64+
65+
| Error Code | Description |
66+
| --- | --- |
67+
| `AUTH_ERR_EMPTY_APIKEY` | The `apikey` header is missing from the request |
68+
| `AUTH_ERR_APIKEY_NOT_FOUND` | The provided API key is invalid |
69+
| `AUTH_ERR_NO_ACCESS` | The API key doesn't have the required scope |
70+
71+
For the complete error reference, see [Error Guide](/articles/error-guide).

rest-api/restrict-features.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,13 @@ The following table lists the properties that the Restrict feature API supports.
6363
| Parameters | Type | Description |
6464
| :----------------- | :--------------- | :--------------------------------------------------------------- |
6565
| featuresToRestrict | array of strings | (_optional_) Indicates the features that needs to be restricted. |
66+
67+
## Error Handling
68+
69+
| Error Code | Description |
70+
| --- | --- |
71+
| `AUTH_ERR_EMPTY_APIKEY` | The `apikey` header is missing from the request |
72+
| `AUTH_ERR_APIKEY_NOT_FOUND` | The provided API key is invalid |
73+
| `AUTH_ERR_NO_ACCESS` | The API key doesn't have the required scope |
74+
75+
For the complete error reference, see [Error Guide](/articles/error-guide).

rest-api/settings.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,13 @@ The **Settings** API lets you customize how conversations behave in your CometCh
2929
- **Conversations** — These settings directly control how [Conversations](/rest-api/conversations) display the last message and calculate unread counts.
3030
- **Messages** — Settings determine which [Message](/rest-api/messages) types affect conversation previews.
3131
- **Management APIs** — Use the [Map Settings API](/rest-api/management-apis/settings/maps-settings) to toggle these features.
32+
33+
## Error Handling
34+
35+
| Error Code | Description |
36+
| --- | --- |
37+
| `AUTH_ERR_EMPTY_APIKEY` | The `apikey` header is missing from the request |
38+
| `AUTH_ERR_APIKEY_NOT_FOUND` | The provided API key is invalid |
39+
| `AUTH_ERR_NO_ACCESS` | The API key doesn't have the required scope |
40+
41+
For the complete error reference, see [Error Guide](/articles/error-guide).

0 commit comments

Comments
 (0)