Skip to Content
OpenE2EEDocs

Protocol versions

The Relay protocol versions that the Relay serves, the window before a version is removed, and what each refusal means.

A Relay protocol version is the wire that the OpenE2EE Signal Protocol SDK and the OpenE2EE Signal Protocol Relay agree on. The Relay reads one version from each request.

  • The Relay serves only version 3. See served versions.
  • SDK 14.4.0 and later releases send version 3. They send the header x-signal-relay-protocol: 3 on each HTTP request to a Relay route. They offer the subprotocol token signal-relay.v3 on the mailbox socket, and the Relay echoes it. The connection document and CORS preflight read no version.
  • SDK 13.5.0 through 14.3.0 send version 2. They send the header x-open-e2ee-relay-protocol: 2 on each HTTP request to a Relay route. They offer the subprotocol token open-e2ee-relay.v2 on the mailbox socket.
  • SDK 10.1.0 through 13.4.0 send version 1. They send the header x-open-e2ee-relay-protocol: 1 on each HTTP request to a Relay route. They send no header on the fetch of the connection document.
  • SDK 10.0.0 sends no header.
  • SDK 14.3.0 and earlier releases send version 1, version 2, or no version. The Relay refuses each of their requests with UPGRADE_REQUIRED. See refusals.
  • A delivery request gets DELIVERY_ALREADY_ACCEPTED when its message identifier belongs to an operation that the Relay already accepted. See errors.

Served versions

VersionFirst SDK releaseEarliest removal
314.4.0None

SDK 14.4.0 and later releases send version 3. They send version 2 only after the Relay refuses version 3. See what the SDK does with a refusal.

Removed versions

VersionSDK releasesRemoved
110.1.0 through 13.4.02026-11-15
213.5.0 through 14.3.02026-11-17

The Relay refuses a removed version with UPGRADE_REQUIRED.

Protocol 3

Version 3 uses the names in this section on the wire.

Version carriers

CarrierVersion 3Removed versions 1 and 2
HTTP headerx-signal-relay-protocol: 3x-open-e2ee-relay-protocol: 1 or x-open-e2ee-relay-protocol: 2
Socket subprotocol tokensignal-relay.v3open-e2ee-relay.v1 or open-e2ee-relay.v2
Socket auth entry prefixsignal-relay.auth.Not read

Version 3 is valid only on its own carrier. The Relay answers PROTOCOL_UNSUPPORTED to each of these requests:

  • A request with version 3 on the header x-open-e2ee-relay-protocol or the token open-e2ee-relay.v3.
  • A request with both HTTP headers.

A request with version 1 or version 2 gets UPGRADE_REQUIRED on each carrier. A request with no version also gets UPGRADE_REQUIRED.

The socket auth entry is the prefix followed by the device token. The Relay reads the auth entry only when its prefix matches the version of the subprotocol token.

Device tokens

A version 3 request gets a device token with these names.

ClaimVersion 3
isssignal-relay
audsignal-relay-device
Scope claimsignal_relay_scope_id

The Relay accepts only a token with these names. A token with the earlier issuer, audience, or scope claim gets TOKEN_INVALID. When an HTTP call gets TOKEN_INVALID, the SDK gets a new token and sends the request once more.

Signed labels

Each signed challenge starts with a label. The signed bytes hold the label followed by a NUL byte (\0). Version 3 uses these six labels.

Signed valueVersion 3 label
Device authenticationsignal-relay-device-authentication-v2
Registration challengesignal-relay-registration-challenge-v2
Recovery challengesignal-relay-recovery-challenge-v2
Device link challengesignal-relay-device-link-challenge-v2
Device token refresh challengesignal-relay-device-token-refresh-challenge-v2
Sender certificate requestsignal-relay-sender-certificate-request-v2

Response fields

Each of these responses holds the version 3 key in this table.

WhereVersion 3 key
Response of /identity/register, /identity/recover, and /identity/devices/linksignalRelayScopeId
Response of /mailbox/pull and the socket mailbox-capabilities framesignalRelayReceipts: true

Window policy

When a later version ships, the earlier version gets an earliest removal date. That date is 180 days after the SDK release that carries the later version. The Relay removed versions 1 and 2 before their earliest removal dates.

The Relay never rolls back below a version that the Served versions table lists.

Refusals

The Relay refuses a version outside the served set with one of two error codes.

CodeCauseHTTPSocketWhat the application does
UPGRADE_REQUIREDThe version is below the oldest served version, or the request has no version.426, retryable falseClose 4426Update to an SDK release that speaks a served version. A retry fails the same way. See upgrades.
PROTOCOL_UNSUPPORTEDThe version is above the newest served version, or it is malformed.400, retryable trueClose 4400Retry later. A version above the newest served version is transient, because the Relay never rolls back below a version that the Served versions table lists. A malformed version fails until the client sends a valid one. The mailbox subscription of the SDK reconnects with its usual backoff.

Version 3 is the only served version. A version 3 request from SDK 14.4.0 or a later release does not get UPGRADE_REQUIRED. SDK 14.3.0 and earlier releases get it.

What the SDK does with a refusal

SDK 10.1.0 and later releases stop on UPGRADE_REQUIRED. On PROTOCOL_UNSUPPORTED, the mailbox socket reconnects, and an HTTP call throws an error whose retryable is true. SDK 14.4.0 and later releases first fall back from version 3 to version 2, as the last list on this page tells.

  • An HTTP call that gets UPGRADE_REQUIRED throws HostedSignalProtocolRelayUpgradeRequiredError. Its code is UPGRADE_REQUIRED, and its retryable is false. The SDK does not retry it. See errors.
  • A socket close 4426 with the reason UPGRADE_REQUIRED moves the mailbox subscription to stopped with the reason upgrade-required. The subscription does not reconnect and does not pull. Only a newer SDK can connect again.
  • A socket close 4400 with the reason PROTOCOL_UNSUPPORTED stays retryable, and so does the HTTP code PROTOCOL_UNSUPPORTED.

SDK 14.4.0 and later releases offer version 3 first. When the Relay refuses version 3 with PROTOCOL_UNSUPPORTED, the client offers version 2 from then on. The Relay refuses version 2 with UPGRADE_REQUIRED, so the client stops.

  • An HTTP call sends the refused request once more with version 2. The Relay refuses the version before it reads the request, so the refused request had no effect. The client signs each proof in the request again with the label of version 2.
  • After a socket close 4400 with the reason PROTOCOL_UNSUPPORTED, the mailbox subscription reconnects with its usual backoff. The next socket offers version 2.
  • The client keeps version 2 until it stops. A new client, or a client that resumes from its store, offers version 3 again. The SDK does not store the offered version.
  • The SDK does not fall back to version 1.
  • The fallback needs a Relay that reads the version 3 carriers. A Relay that predates version 3 does not refuse version 3 with PROTOCOL_UNSUPPORTED, so the client does not fall back. Use SDK 14.4.0 or a later release with a Relay that serves version 3.

On this page