Attach this agent to a person's fmrl account
fmrl_attachCreate a 10-minute one-time link and comparison code that lets a person attach this machine's fmrl agent by opening the link and pressing Attach.
Instructions
Get a one-time link, good for 10 minutes, that attaches this machine's fmrl agent to the person who opens it and presses Attach, with a short code the page shows beside it for them to compare. Only call it when the person asked to attach the agent; to check whether it is attached, use fmrl_whoami. Relay the link unchanged, with its #r= fragment, and the code; never open the link yourself. The page names this machine by its host name unless machine is given. When the agent is already attached, no link is made: the answer says so, and the call only gives the agent its machine name when it has none yet or the person named another, so their fmrl account shows it beside the agent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| machine | No | The machine name to show on the page; defaults to this computer's host name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | The code fmrl.site shows beside the link, for the person to compare. | |
| machine | No | The machine name the link carries, as fmrl.site cleaned it. | |
| renamed | No | Already attached: true when this call gave the agent its machine name, so the person's account now shows it; false when that update failed. Absent when the name was already right. | |
| attached | Yes | True: this agent is already attached and nothing was minted. | |
| attach_url | No | The one-time link, with the key ring when available. Relay it unchanged. | |
| expires_at | No | ||
| attached_at | No | ||
| attached_via | No | ||
| canvases_url | No |