Mint a pairing code
const url = 'http://localhost:11044/api/v1/channels/consumers/example/example/assistant/pairing';const options = {method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”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
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
Responses
Section titled “Responses”OK
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
The code itself; minting again stops it working
Name of the consumer the code pairs a sender with
When the code stops working, ten minutes after minting, as an ISO-8601 instant

