Package org.signal.chat.messages
Message
GetMessagesStreamClosed
Message
IndividualRecipientMessageBundle
Message
MultiRecipientMismatchedDevices
Message
SendAuthenticatedSenderMessageRequest
Message
SendMessageAuthenticatedSenderResponse
Message
SendMultiRecipientMessageRequest
Message
SendMultiRecipientMessageResponse
Message
SendMultiRecipientStoryRequest
Message
SendSealedSenderMessageRequest
Message
SendStoryMessageRequest
Services
service Messages
Provides methods for sending "unsealed sender" messages.
rpc SendMessage
Request: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest
Response:
org.signal.chat.messages.SendMessageAuthenticatedSenderResponse
Sends an "unsealed sender" message to all devices linked to a single destination account.
The destination account must not be the same as the authenticated caller.
Callers should use SendSyncMessage to send messages to themselves.
rpc SendSyncMessage
Request: org.signal.chat.messages.SendSyncMessageRequest
Response:
org.signal.chat.messages.SendMessageAuthenticatedSenderResponse
Sends a "sync" message to all other devices linked to the authenticated sender's account.
rpc GetMessages
Request: org.signal.chat.messages.GetMessagesRequest
Response:
org.signal.chat.messages.GetMessagesResponse
Retrieve messages for the authenticated device. When the caller receives and successfully processes a message returned in a GetMessagesResponse they must send a corresponding GetMessagesRequest indicating that the message has been processed (an ack). Acks should only be sent for messages delivered via the currently open RPC.
Only the first GetMessagesRequest may contain request parameters that configure the stream. The first request must not contain an ack.
The server will keep the stream open until the client disconnects. Only one GetMessages stream may be open per device. If a second GetMessages stream is opened, the server may terminate any of the streams with a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be present in the error details.
rpc ReportMessage
Request: org.signal.chat.messages.ReportMessageRequest
Response:
org.signal.chat.messages.ReportMessageResponse
Reports a message as spam.
service MessagesAnonymous
Provides methods for sending "sealed sender" messages.
rpc SendSingleRecipientMessage
Request: org.signal.chat.messages.SendSealedSenderMessageRequest
Response:
org.signal.chat.messages.SendMessageResponse
Sends a "sealed sender" message to all devices linked to a single destination account.
If this RPC is authorized with an unidentified access key, it will fail with an authorization failure if the credential is invalid OR if the destination account was not found. If it is authorized using a group send token, it will fail with an authorization failure if the credential is invalid and with an destination not found error if the account does not exist
rpc SendMultiRecipientMessage
Request: org.signal.chat.messages.SendMultiRecipientMessageRequest
Response:
org.signal.chat.messages.SendMultiRecipientMessageResponse
Sends a "sealed sender" message with a common payload to all devices linked to multiple destination accounts.
rpc SendStory
Request: org.signal.chat.messages.SendStoryMessageRequest
Response:
org.signal.chat.messages.SendMessageResponse
Sends a story message to devices linked to a single destination account.
rpc SendMultiRecipientStory
Request: org.signal.chat.messages.SendMultiRecipientStoryRequest
Response:
org.signal.chat.messages.SendMultiRecipientMessageResponse
Sends a story message with a common payload to devices linked to devices linked to multiple destination accounts.
Messages
message ChallengeRequired
| Field | Type | Description | |
|---|---|---|---|
| 1 | token |
string
|
An opaque token identifying this challenge request. Clients must generally submit this token when submitting a challenge response. |
| 2 | challenge_options |
repeated
org.signal.chat.messages.ChallengeRequired.ChallengeType
|
A list of challenge types callers may choose to complete to resolve the challenge requirement. May be empty, in which case callers cannot resolve the challenge by any means other than waiting. |
| 3 | retry_after_seconds |
optional
uint64
|
A duration (in seconds) after which the challenge requirement may be resolved by simply waiting. May not be set if the challenge cannot be resolved by waiting. |
message GetMessageOptions
(Nested in org.signal.chat.messages.GetMessagesRequest
)
| Field | Type | Description | |
|---|---|---|---|
| 1 | drop_stories |
bool
|
If present and true, the server will not deliver any messages with the story flag set. This flag may only be set on the first GetMessagesRequest sent from the client to the server in an RPC stream. |
message GetMessagesRequest
| Field | Type | Description | |
|---|---|---|---|
|
oneof request
|
|||
| 1 | options |
org.signal.chat.messages.GetMessagesRequest.GetMessageOptions
|
Configuration options for the message stream. Required for the first request of the stream, forbidden on subsequent reqeusts. |
| 2 | server_guid_ack |
bytes
|
The server_guid of an envelope previously returned in a GetMessagesResponse that has been successfully processed by the caller. Forbidden on the first request of the stream, required on subsequent requests. |
message GetMessagesResponse
| Field | Type | Description | |
|---|---|---|---|
| 3 | server_time_epoch_millis |
uint64
|
The time, in milliseconds since the Unix epoch, at which this response was sent, according to the server's clock. This can be helpful for detecting clock drift between the client and server, which can be important for time-sensitive messages. |
|
oneof response
|
|||
| 1 | envelope |
textsecure.Envelope
|
A message. On successful receipt of an envelope the caller should ack the envelope by sending a GetMessagesRequest with the envelope's server guid. Acks should only be sent for envelopes received on the currently open RPC. |
| 2 | queue_empty |
google.protobuf.Empty
|
An indicator that all outstanding messages for the device have been drained and acked by the client. The stream will remain open and continue to deliver newly arrived messages. |
message GetMessagesStreamClosed
The reason why a GetMessages RPC is being closed by the server.
| Field | Type | Description | |
|---|---|---|---|
|
oneof reason
|
|||
| 1 | conflicting_stream |
google.protobuf.Empty
|
Another caller has opened a GetMessages stream for the same device. |
message IndividualRecipientMessageBundle
| Field | Type | Description | |
|---|---|---|---|
| 1 | timestamp |
uint64
|
The time, in milliseconds since the epoch, at which this message was originally sent from the perspective of the sender. Note that the maximum allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date for additional details and discussion. |
| 2 | messages |
map<uint32, Message>
|
A map of device IDs to individual messages. Generally, callers must include one message for each device linked to the destination account. In cases of "sync messages" where a sender is distributing information to other devices linked to the sender's account, senders may omit a message for the sending device. |
message Message
(Nested in org.signal.chat.messages.IndividualRecipientMessageBundle
)
A message for an individual device linked to a destination account.
| Field | Type | Description | |
|---|---|---|---|
| 1 | registration_id |
uint32
|
The registration ID for the destination device. |
| 2 | payload |
bytes
|
The content of the message to deliver to the destination device. 256 KiB |
| 3 | type |
org.signal.chat.messages.SendMessageType
|
The message type of the message. If this message is part of an unidentified send, this must be UNIDENTIFIED_SENDER |
message MismatchedDevices
| Field | Type | Description | |
|---|---|---|---|
| 1 | service_identifier |
org.signal.chat.common.ServiceIdentifier
|
The service identifier to which the devices named in this object are linked. |
| 2 | missing_devices |
repeated
uint32
|
A list of device IDs that are linked to the destination account, but were not included in the collection of messages bound for the destination account. |
| 3 | extra_devices |
repeated
uint32
|
A list of device IDs that were included in the collection of messages bound for the destination account, but are not currently linked to the destination account. |
| 4 | stale_devices |
repeated
uint32
|
A list of device IDs that present in the collection of messages bound for the destination account and are linked to the destination account, but have a different registration ID than the registration ID presented by the sender (indicating that the destination device has likely been replaced by another device). |
message MultiRecipientMessage
| Field | Type | Description | |
|---|---|---|---|
| 1 | timestamp |
uint64
|
The time, in milliseconds since the epoch, at which this message was originally sent from the perspective of the sender. Note that the maximum allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date for additional details and discussion. |
| 2 | payload |
bytes
|
The serialized multi-recipient message payload. 256 KiB payload + (5000 * 100) of overhead |
message MultiRecipientMismatchedDevices
| Field | Type | Description | |
|---|---|---|---|
| 1 | mismatched_devices |
repeated
org.signal.chat.messages.MismatchedDevices
|
A list of sets of discrepancies between the destination devices identified in a request to send a message and the devices that are actually linked to a destination account. |
message MultiRecipientSuccess
| Field | Type | Description | |
|---|---|---|---|
| 1 | unresolved_recipients |
repeated
org.signal.chat.common.ServiceIdentifier
|
A list of destination service identifiers that could not be resolved to registered Signal accounts. The message in the original request was sent to all service identifiers/devices in the original request except for the destination devices associated with the service identifiers in this list. |
message ReportMessageRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | source_service_identifier |
org.signal.chat.common.ServiceIdentifier
|
The service identifier of the party that sent the offending message |
| 2 | message_guid |
bytes
|
The GUID of the offending message |
| 3 | report_spam_token |
bytes
|
The spam-reporting token attached to the offending message |
message SendAuthenticatedSenderMessageRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | destination |
org.signal.chat.common.ServiceIdentifier
|
The service identifier of the account to which to deliver the message. |
| 2 | ephemeral |
bool
|
If true, this message will only be delivered to destination devices that have an active message delivery channel with a Signal server. |
| 3 | urgent |
bool
|
Indicates whether this message is urgent and should trigger a high-priority notification if the destination device does not have an active message delivery channel with a Signal server |
| 4 | messages |
org.signal.chat.messages.IndividualRecipientMessageBundle
|
The messages to send to the destination account. |
message SendMessageAuthenticatedSenderResponse
| Field | Type | Description | |
|---|---|---|---|
|
oneof response
|
|||
| 1 | success |
google.protobuf.Empty
|
The message was successfully delivered to all destination devices |
| 2 | mismatched_devices |
org.signal.chat.messages.MismatchedDevices
|
A list of discrepancies between the destination devices identified in a request to send a message and the devices that are actually linked to an account. |
| 3 | challenge_required |
org.signal.chat.messages.ChallengeRequired
|
A description of a challenge callers must complete before sending additional messages. |
| 4 | destination_not_found |
org.signal.chat.errors.NotFound
|
The destination account did not exist |
message SendMessageResponse
| Field | Type | Description | |
|---|---|---|---|
|
oneof response
|
|||
| 1 | success |
google.protobuf.Empty
|
The message was successfully delivered to all destination devices |
| 2 | mismatched_devices |
org.signal.chat.messages.MismatchedDevices
|
A list of discrepancies between the destination devices identified in a request to send a message and the devices that are actually linked to an account. |
| 3 | failed_unidentified_authorization |
org.signal.chat.errors.FailedUnidentifiedAuthorization
|
The provided unidentified authorization credential was invalid |
| 4 | destination_not_found |
org.signal.chat.errors.NotFound
|
The destination account did not exist |
message SendMultiRecipientMessageRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | ephemeral |
bool
|
If true, this message will only be delivered to destination devices that have an active message delivery channel with a Signal server. |
| 2 | urgent |
bool
|
Indicates whether this message is urgent and should trigger a high-priority notification if the destination device does not have an active message delivery channel with a Signal server |
| 3 | message |
org.signal.chat.messages.MultiRecipientMessage
|
The multi-recipient message to send to all destination accounts and devices. |
| 4 | group_send_token |
bytes
|
A group send endorsement token for the destination account. |
message SendMultiRecipientMessageResponse
| Field | Type | Description | |
|---|---|---|---|
|
oneof response
|
|||
| 1 | success |
org.signal.chat.messages.MultiRecipientSuccess
|
The message was sent to at least some of the destination accounts/devices identified in the original request. |
| 2 | mismatched_devices |
org.signal.chat.messages.MultiRecipientMismatchedDevices
|
A list of sets of discrepancies between the destination devices identified in a request to send a message and the devices that are actually linked to a destination account. |
| 3 | failed_unidentified_authorization |
org.signal.chat.errors.FailedUnidentifiedAuthorization
|
The provided unidentified authorization credential was invalid |
message SendMultiRecipientStoryRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | urgent |
bool
|
Indicates whether this message is urgent and should trigger a high-priority notification if the destination device does not have an active message delivery channel with a Signal server |
| 2 | message |
org.signal.chat.messages.MultiRecipientMessage
|
The multi-recipient story message to send to all destination accounts and devices. |
message SendSealedSenderMessageRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | destination |
org.signal.chat.common.ServiceIdentifier
|
The service identifier of the account to which to deliver the message.
If |
| 2 | ephemeral |
bool
|
If true, this message will only be delivered to destination devices that have an active message delivery channel with a Signal server. |
| 3 | urgent |
bool
|
Indicates whether this message is urgent and should trigger a high-priority notification if the destination device does not have an active message delivery channel with a Signal server |
| 4 | messages |
org.signal.chat.messages.IndividualRecipientMessageBundle
|
The messages to send to the destination account. |
|
oneof authorization
|
|||
| 5 | unidentified_access_key |
bytes
|
The unidentified access key (UAK) for the destination account. |
| 6 | group_send_token |
bytes
|
A group send endorsement token for the destination account. |
| 7 | unrestricted_access |
google.protobuf.Empty
|
The destination account allows unrestricted unidentified access |
message SendStoryMessageRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | destination |
org.signal.chat.common.ServiceIdentifier
|
The service identifier of the account to which to deliver the message. |
| 2 | urgent |
bool
|
Indicates whether this message is urgent and should trigger a high-priority notification if the destination device does not have an active message delivery channel with a Signal server |
| 3 | messages |
org.signal.chat.messages.IndividualRecipientMessageBundle
|
The messages to send to the destination account. |
message SendSyncMessageRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | urgent |
bool
|
Indicates whether this message is urgent and should trigger a high-priority notification if the destination device does not have an active message delivery channel with a Signal server |
| 2 | messages |
org.signal.chat.messages.IndividualRecipientMessageBundle
|
The messages to send to the destination account. |
Enums
enum ChallengeType
| Name | Number | Description |
|---|---|---|
UNSPECIFIED |
0 | |
CAPTCHA |
1 | A challenge that callers can fulfill by completing a captcha. |
PUSH_CHALLENGE |
2 | A challenge that callers can fulfill by supplying a token delivered via push notification. |
enum SendMessageType
| Name | Number | Description |
|---|---|---|
UNSPECIFIED |
0 | |
DOUBLE_RATCHET |
1 | A double-ratchet message represents a "normal," "unsealed-sender" message encrypted using the Double Ratchet within an established Signal session. |
PREKEY_MESSAGE |
2 | A prekey message begins a new Signal session. The |
PLAINTEXT_CONTENT |
3 | A plaintext message is used solely to convey encryption error receipts and never contains encrypted message content. Encryption error receipts must be delivered in plaintext because encryption/decryption of a prior message failed and there is no reason to believe that encryption/decryption of subsequent messages with the same key material would succeed. Critically, plaintext messages never have "real" message content generated by users. Plaintext messages include sender information. |
UNIDENTIFIED_SENDER |
4 | An unidentified sender message is an encrypted message. No other information about the type of the encrypted message is known to the server. Unidenitfied sender messages require an unidentified access token or a group send endorsement token to prove the unidentified sender is authorized to send messages to the destination. |