Messages
Send text or raw data over UDP or TCP to a device with a specific SIM ID.
If the protocol is UDP, the packet will be sent to the receiving port. If the protocol is TCP, a connection will be established with the device on that port and the data will be sent. If the device does not accept incoming connections on that port, the data will be discarded.
Either text
or data
must be provided, but not both. Use text
for string data and data
for base64-encoded binary data that will be decoded and sent as raw bytes.
000000001
The protocol to use for sending the message
The target port number
String data to send (mutually exclusive with data)
Base64-encoded binary data to send (mutually exclusive with text)
Message sent successfully
Bad request, invalid parameters or device offline
POST /messages/{sim_id} HTTP/1.1
Host: api.onomondo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"protocol": "udp",
"port": 1234,
"text": "hello world"
}
{
"id": "46c5e0e3-2739-4b6a-8f78-dc4a936d5861"
}
Last updated