HTTP 400 · Bad Request
HTTP 400 Flood / Rate limits

When & why it happens

The chat already has the maximum number of admins permitted by Telegram. Demote someone before promoting a new admin.

Handling in gogram

Surfaced as *gogram.ErrResponseCode. Match on the message:

if err, ok := err.(*gogram.ErrResponseCode); ok { if err.Message == "ADMINS_TOO_MUCH" { // handle this error } }