Sign in
Docs
API referenceCoordinator

API reference

Send a terminal message

Have a token? Manage tokens in the console
POST
/v1/coordinator/terminals/{handle}/messages

A sealed message from your phone to your Mac, such as the key handshake: the server queues it in order and hands the ciphertext to your Mac's stream, never reading, changing or logging it (at most 16 KiB). The answer is the server's delivery number. A full queue or too fast a pace is RESOURCE_EXHAUSTED (busy, rate): nothing is dropped, send again. No Mac serving, or a handle that is not yours, is 404. Start the watch first: the Mac's answer comes back sealed on it. Only your own person token is served.

Needs scope terminals:write.

Authorization

bearer
headerAuthorizationBearer <JWT>

An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.

Path Parameters

handle*string

A shared session's handle from List terminals, or hs (handshake) or hb (heartbeat), which need no session; it is part of the path.

Request Body

iohr.coordinator.v1.SendTerminalMessageRequest; path variables override their fields

application/json
  1. body

iohr.coordinator.v1.SendTerminalMessageRequest

handle?string
peer?string
sealed?string
Formatbyte

Response Body

iohr.coordinator.v1.SendTerminalMessageResponse

application/json
  1. response

iohr.coordinator.v1.SendTerminalMessageResponse

seq*string
Formatint64
import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try {  const { value } = await api.coordinator.sendTerminalMessage("<handle>", {    peer: "<peer>",    sealed: "<sealed>",  });  console.log(value);} catch (e) {  if (!(e instanceof ApiError)) throw e;  console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);  process.exitCode = 1;}

npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.

Example Response
{  "seq": "string"}