Data for a request to the /sendToDevice API endpoint (specification).

Send an event to a single device or to a group of devices.

Constructors

Properties

Methods

Constructors

  • Create a new ToDeviceRequest.

    Parameters

    • id: string
    • event_type: string
    • txn_id: string
    • body: string

    Returns ToDeviceRequest

Properties

body: string

A JSON-encoded string containing the rest of the payload: messages.

It represents the body of the HTTP request.

event_type: string

A string representing the type of event being sent to each devices.

id: string

The request ID. For to-device request this would be the same value as txn_id. It is exposed also as id so that the js bindings are consistent with the other request types by using this field to mark as sent.

txn_id: string

A string representing a request identifier unique to the access token used to send the request.

Get its request type.

Methods

  • Returns void