Message

Get a message from the inbound message queue

Get a message from the inbound message queue. By default, the message is removed from the queue and won't be shown again. If the peek query parameter is set to true, the message will be peeked, and the next call to this endpoint will show the same message. This method returns immediately by default: a message is returned if one is ready, and if there isn't nothing is returned. If the timeout query parameter is set, this call won't return for the given amount of seconds, unless a message is received

get/api/v1/messages

Query parameters

peekboolean

Whether to peek the message or not. If this is true, the message won't be removed from the inbound queue when it is read

timeoutinteger

Amount of seconds to wait for a message to arrive if one is not available. Setting this to 0 is valid and will return a message if present, or return immediately if there isn't

Response

Message retrieved

idstring

Id of the message, hex encoded

src_ipstring ipv6

Sender overlay IP address

src_pkstring

Sender public key, hex encoded

dst_ipstring ipv6

Receiver overlay IP address

dst_pkstring

Receiver public key, hex encoded. This is the public key of the system

payloadstring byte

The message payload, encoded in standard alphabet base64

Example response

{
  "id": "0123456789abcdef",
  "src_ip": "249:abcd:0123:defa::1",
  "src_pk": "fedbca9876543210fedbca9876543210fedbca9876543210fedbca9876543210",
  "dst_ip": "34f:b680:ba6e:7ced:355f:346f:d97b:eecb",
  "dst_pk": "02468ace13579bdf02468ace13579bdf02468ace13579bdf02468ace13579bdf",
  "payload": "xuV+"
}

Changes