setChatTitle
Set the title of a chat. The Bot must have administrator privileges to perform this action.
Request
POST /:token/setchattitle
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| chat_id | Integer/String | Yes | Unique identifier for the target chat or username |
| title | String | Yes | New chat title, 1-255 characters |
Response
Returns Boolean true on success.
json
{
"ok": true,
"result": true
}Error Codes
| Code | Description |
|---|---|
| 400 | Bad request parameters, e.g. title is empty or exceeds 255 characters |
| 401 | Invalid or expired token |
| 403 | Bot does not have administrator privileges or lacks permission to change chat info |
