HTTP 403 · Forbidden
HTTP 403 Permissions / Forbidden

When & why it happens

You need to disable privacy settings for your profile picture in order to make your geolocation public. Treated by gogram as a regular API error; inspect ErrResponseCode.Message for the exact code.

Handling in gogram

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

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