Error code: 40331 - Unable to activate account due to placement constraint (incompatible environment)

This error code means you are connecting to an app that belongs to a dedicated cluster through the wrong url, for example, by neglecting to specify the correct environment when instantiating a client library.  Our Enterprise customers who have chosen to have their own private cluster are provided with custom environment endpoints.

If a request therefore arrives at an endpoint that is not the expected dedicated cluster, or in the wrong region, the account the app belongs to in the that scope may be disabled, and this error message is sent to connecting clients.

For example, if you have a dedicated environment called acme, then all realtime clients when configured to use the acme environment will automatically connect to However, if the acme environment is not configured, then by default all clients will connect to (the global cluster) and the requests may be rejected.

We recommend you check your custom environment settings for all connecting clients if this applies.