Loading...
Creates a code to adopt a device. The adopt code is valid for a limited time.
Name of the device that will be shared to the adopter
keep this secret locally to use with confirm
const response = await fetch('https://api.bringyour.com/device/create-adopt-code', { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({}), }); const data = await response.json();
{ "adopt_code": "text", "adopt_secret": "text", "duration_minutes": 0, "error": { "message": "text" } }