Create an API key
cometchat_create_api_keyCreates an API key and returns its value: fullAccess (REST, server-side env only) or authOnly (client Auth Key). Write it to an env file; don't echo it. Check cometchat_list_api_keys first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"app_id": "<app_id>",
"name": "<name>",
"scope": "<scope>"
},
"name": "cometchat_create_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Key name, e.g. 'data-import' or 'backend' | |
| scope | Yes | fullAccess = REST API key; authOnly = Auth Key | |
| app_id | Yes | The CometChat App ID (from cometchat_list_apps). | |
| confirm | No | Set true only after the user has explicitly agreed to this change. On a local connection that is enough; on the hosted server this change needs approval_code from the user's browser instead, and confirm is ignored. | |
| approval_code | No | The code the user got after approving this exact change in their browser. Only ever from the user; never make one up or reuse one for different arguments. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Key name | |
| scope | Yes | Scope | |
| app_id | Yes | App ID | |
| api_key | Yes | The key. Store it server-side; don't print it back. |