Skip to content

Mint a pairing code

POST
/api/v1/channels/consumers/{realmName}/{consumerName}/assistant/pairing
curl --request POST \
--url http://localhost:11044/api/v1/channels/consumers/example/example/assistant/pairing \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

JSON fields: installationId, expectedRevision. A single-use code that works for ten minutes, shown once. The sender sends ‘pair ’ on the channel. Minting again stops the last code working.

realmName
required
string

Name of the captured realm installed in the signed-in owner’s world; non-blank, at most 256 UTF-8 bytes, no control characters and not all * (400 otherwise). 409 when its live installation is not the one named by the body’s installationId and expectedRevision

consumerName
required
string

Consumer the pairing code is for; same text rules as the realm name. 409 when it has no assistant grant, which includes a name the realm does not declare

OK

Media type*/*

A single-use pairing code minted by POST …/assistant/pairing and shown only in this response; a sender sends ‘pair ’ on the channel to be answered

object
code
required

The code itself; minting again stops it working

string
consumerName
required

Name of the consumer the code pairs a sender with

string
expiresAt
required

When the code stops working, ten minutes after minting, as an ISO-8601 instant

string format: date-time