Skip to content

User messages

The client.user_messages surface sends a hex payload to a tag's badge over the WIN UDP gateway. The wire endpoint is POST /api/v2/user_msg/. This is a different feature from client.messaging: messaging writes an inbox row to the server's messages table; user_messages forwards a downlink frame over UDP to the addressed tag's badge. The two sub-clients are kept separate because the entities are independent.

Operations

Method What it does
client.user_messages.send(*, tag_uid, hex) Send a hex payload to a tag's badge over UDP. Returns None.
client.user_messages.send(
    tag_uid="KCHEhmDkSlG0pLJpAlgDxw",
    hex="AABBCC",
)

Constraints:

  • hex must be an even-length hex string, 2–512 chars (1–256 bytes). Malformed input raises ValueError before any network call.
  • tag_uid is the SDK's tag uid (server-side trackable_object uid). The tag must currently have a mac_address (i.e. an active node association); otherwise the server returns 404 and the SDK raises NotFound.
  • The server responds 200 with an empty body on success and does not confirm badge-side delivery. To observe the badge's reply, subscribe to the user_msg channel — see Streaming for the typed UserMsgMessage class and a REST → WS round-trip recipe.

See also

  • Messaging — the user-to-user inbox endpoint at /api/v2/messaging; unrelated to this sub-client.
  • Error handling — typed exceptions.