HTTP 403 · Forbidden
HTTP 403 Permissions / Forbidden

When & why it happens

The current user is not allowed to perform this action on the targeted chat send docs (permission or privacy restriction).

Handling in gogram

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

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