Layer 220
BotsSendCustomRequest
Sends a custom request; for bots only
method
Bots
bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON;
Parameters
| Name | Type | Description |
|---|---|---|
| CustomMethod | string | The method name |
| Params | DataJSON | JSON-serialized method parameters |
Returns
DataJSONPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | DATA_JSON_INVALID | The provided JSON data is invalid. |
| 400 | METHOD_INVALID | The specified method is invalid. |
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
Gogram Example
// BotsSendCustomRequest - positional arguments result, err := client.BotsSendCustomRequest("...", &tg.DataJson{}) if err != nil { // handle error } // result is *tg.DataJson