HTTP 400 · Bad Request
HTTP 400 Authentication

When & why it happens

The server is rate-limiting this operation. Sleep for the duration the server reports before retrying.

Handling in gogram

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

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