40163: Operation requires a TLS connection
tls_connection_requiredThe channel the operation targets has a channel rule that requires TLS connections, and the connection or request that performed it did not use TLS.
What you should do
Connect over TLS. Every Ably SDK does so by default, so this normally means the client has explicitly turned TLS off, or is reaching Ably through an intermediary that terminates it. If the channel does not need the protection, remove the matching "TLS required" channel rule in your app instead.
Why it happens
When a channel rule is configured to require TLS, any operation on a channel matching the rule are rejected when not performed using a connection or request that uses TLS.
What you'll see
The error is reported with code 40163 and HTTP status 401, with a message of the form Access denied to channel: namespace requires TLS connection.