Skip to content

Gateway Close Codes

Gateway closes connections on protocol or authentication errors. Codes in 4000-4999 are application-level, issued by the server. For standard close codes (1000-1015), reconnecting is safe.

Reconnect: No means the issue cannot be fixed without developer action (wrong token, outdated API version). Looping reconnects will turn into a self-inflicted DoS.

CodeNameReconnectDescription
4012INVALID_API_VERSIONNoURL contains an unsupported v=. Use v=1.