HTTP 403 · Forbidden
CHANNEL_PRIVATE
You haven't joined this channel/supergroup.
HTTP 403
Channels & Chats
When & why it happens
The channel is private and the current user is not a member, or it has been banned/kicked.
Handling in gogram
Surfaced as *gogram.ErrResponseCode. Match on the message:
if err, ok := err.(*gogram.ErrResponseCode); ok {
if err.Message == "CHANNEL_PRIVATE" {
// handle this error
}
}
Related errors
BROADCAST_CALLS_DISABLEDBroadcast calls are disabled for this chat/channel.BROADCAST_ID_INVALIDBroadcast ID invalid.BROADCAST_REQUIREDThis method can only be called on a channel.CHANNEL_ADD_INVALIDThe specified channel is invalid.CHANNEL_FORUM_MISSINGThis supergroup is not a forum.CHANNEL_ID_INVALIDThe specified supergroup ID is invalid.CHANNEL_INVALIDThe provided channel is invalid.CHANNEL_PARTICIPANT_MISSINGThe current user is not in the channel.CHANNEL_PUBLIC_GROUP_NAChannel/supergroup not available.CHANNEL_TOO_BIGThis channel has too many participants (>1000) to be deleted.CHANNEL_TOO_LARGEChannel is too large to be deleted.CHAT_ABOUT_NOT_MODIFIEDAbout text has not changed.