| code | 40168 |
|---|---|
| identifier | sdk_version_not_mau_compatible |
| title | SDK version not compatible with MAU pricing |
| summary | A connection or request was refused because it came from a version of an Ably SDK that is not compatible with monthly active user (MAU) pricing, which the account uses. |
Upgrade to the latest version of the device or server SDK, which might be a different package from the SDK you use now. Use the device package in apps on end users' devices and the server package on your own servers. Find the SDK you use in this table:
| If you use | Upgrade to |
|---|---|
Ably Pub/Sub JavaScript SDK (ably npm package) |
@ably/pubsub-device 3.0.0 or later on devices, @ably/pubsub-server 3.0.0 or later on servers |
Ably Pub/Sub Go SDK (github.com/ably/ably-go) |
github.com/ably/ably-pubsub-go/v2 v2.0.0 or later, importing device/pubsub on devices or server/pubsub on servers |
Ably Pub/Sub Swift and Objective-C SDK (ably-cocoa) |
The AblyPubSubDevice product of ably-pubsub-cocoa 2.0.0 or later |
Ably Pub/Sub Java and Android SDKs (ably-java, ably-android) |
io.ably.pubsub:device 2.0.0 or later on devices, io.ably.pubsub:server 2.0.0 or later on servers |
Ably Pub/Sub .NET SDK (ably.io NuGet package) |
Ably.PubSub.Device 2.0.0 or later on devices, Ably.PubSub.Server 2.0.0 or later on servers |
Ably Pub/Sub Python SDK (ably PyPI package, or ably-pubsub-server 4.0.0) |
ably-pubsub-server 4.0.1 or later |
Ably Pub/Sub Ruby SDK (ably or ably-rest gem) |
The ably-pubsub-server gem 2.0.0 or later |
Ably Pub/Sub PHP SDK (ably/ably-php) |
ably/pubsub-server 2.0.0 or later |
Ably Pub/Sub Flutter SDK (ably_flutter) |
ably_pubsub_device_flutter 2.0.0 or later |
Ably Chat JavaScript SDK (@ably/chat) |
@ably/chat 2.0.0 or later, with @ably/pubsub-device or @ably/pubsub-server 3.0.0 or later in place of the ably npm package |
Ably Spaces SDK (@ably/spaces) |
@ably/spaces 0.6.0 or later, with @ably/pubsub-device or @ably/pubsub-server 3.0.0 or later in place of the ably npm package |
Ably AI Transport SDK (@ably/ai-transport) |
@ably/ai-transport 0.11.0 or later, with @ably/pubsub-device or @ably/pubsub-server 3.0.0 or later in place of the ably npm package |
Ably Chat Kotlin SDK (com.ably.chat:chat) |
com.ably.chat:chat 2.0.0 or later, with io.ably.pubsub:device or io.ably.pubsub:server 2.0.0 or later in place of ably-java or ably-android |
Ably Chat Swift SDK (ably-chat-swift) |
ably-chat-swift 2.0.0 or later, with the AblyPubSubDevice product of ably-pubsub-cocoa 2.0.0 or later in place of ably-cocoa |
Ably CLI (@ably/cli) |
@ably/cli 2.0.0 or later |
Ably Kafka Connector (kafka-connect-ably) |
kafka-connect-ably 4.2.0 or later |
Ably Laravel Echo (@ably/laravel-echo) |
@ably/laravel-echo 1.1.0 or later, removing the ably npm package |
Ably Laravel Broadcaster (ably/laravel-broadcaster) |
ably/laravel-broadcaster 1.1.0 or later |
Ably PHP Laravel (ably/ably-php-laravel) |
ably/laravel-broadcaster 1.1.0 or later, or ably/pubsub-server 2.0.0 or later |
Under MAU pricing, Ably counts each end user's device toward the account's monthly active users, but not your own servers, so it needs to know which of the two each client is. Versions of Ably SDKs that are compatible with MAU pricing provide separate device and server packages so Ably can tell them apart. Earlier versions don't, and nor do SDKs built on them, such as earlier versions of the Chat or Spaces SDKs, so their connections and requests are refused.
The error is reported with code 40168 and HTTP status 400. The message starts This version of the Ably SDK is not compatible with your account, which uses MAU pricing., followed by what to use instead of the SDK that sent the connection or request. For the Ably Pub/Sub JavaScript SDK, for example, the message is This version of the Ably SDK is not compatible with your account, which uses MAU pricing. Use @ably/pubsub-device 3.0.0+ on end-user devices or @ably/pubsub-server 3.0.0+ on servers, instead of the ably npm package.
When Ably doesn't recognize the SDK, the message is This version of the Ably SDK is not compatible with your account, which uses MAU pricing. Upgrade to the latest version that is listed as compatible with MAU pricing. See https://ably.com/docs/sdks