Interface SendToDeviceApi
-
@Path("/_matrix/client/r0/sendToDevice") @Consumes("application/json") @Produces("application/json") public interface SendToDeviceApi
This module provides a means by which clients can exchange signalling messages without them being stored permanently as part of a shared communication history. A message is delivered exactly once to each client device.
The primary motivation for this API is exchanging data that is meaningless or undesirable to persist in the room DAG - for example, one-time authentication tokens or key data. It is not intended for conversational data, which should be sent using the normal /rooms/<room_id>/send API for consistency throughout Matrix.
-
-
Method Summary
Modifier and Type Method Description void
send(String eventType, String txnId, SendToDeviceRequest sendToDeviceRequest, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse, javax.ws.rs.core.SecurityContext securityContext)
This endpoint is used to send send-to-device events to a set of client devices.
-
-
-
Method Detail
-
send
@PUT @Path("/{eventType}/{txnId}") void send(@PathParam("eventType") String eventType, @PathParam("txnId") String txnId, SendToDeviceRequest sendToDeviceRequest, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @Context javax.ws.rs.core.SecurityContext securityContext)
This endpoint is used to send send-to-device events to a set of client devices.
Requires auth: Yes.
Return:EmptyResponse
.Status code 200: The message was successfully sent.
- Parameters:
eventType
- Required. The type of event to send.txnId
- Required. The transaction ID for this event. Clients should generate an ID unique across requests with the same access token; it will be used by the server to ensure idempotency of requests.sendToDeviceRequest
- Request body.uriInfo
- Request Information.httpHeaders
- Http headers.asyncResponse
- Asynchronous response.securityContext
- Security context.
-
-