Detailed description:
The "Server name must be non-empty" error occurs when adding an account with a proxy in your automation tool and indicates that the proxy server address field is empty. This is a validation on the Telegram API side: during network initialization the client must provide a valid proxy host, otherwise the connection cannot be established and requests to Telegram are rejected. As a result, messaging, inviting, parsing and other features fail to start.
Why it happens:
1. The “server/host” field is blank or contains only whitespace.
2. An invalid value is used (not a domain or IP, or contains forbidden characters).
3. Proxy settings are incomplete (port is set but server is missing).
4. Your automation passes an empty string or null for the server due to a misconfiguration when calling the Telegram API.
How to fix:
1. Provide full proxy details when adding the account: Server/Host, Port (positive number), optional Login/Password, and type (HTTP/SOCKS5).
2. Ensure the address is entered without trailing spaces, with proper encoding and no hidden characters.
3. Verify the proxy host is reachable from your network and not blocked by a firewall or ISP.
4. If using a config file or import, resave the values and repeat the authorization step.
Once the proxy parameters are filled correctly, the connection initializes as expected, the Telegram API accepts requests, and your automation workflows operate reliably.