HTTP 403 · Forbidden
HTTP 403 Permissions / Forbidden

When & why it happens

Privacy settings prevent this action (e.g. the target user disallows being added to groups, called, or messaged by strangers).

Handling in gogram

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

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