Approve a device authorization (browser)
POST
/auth/device/approve
const url = 'https://api.loomta.com/auth/device/approve';const options = { method: 'POST', headers: { 'x-organization-id': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"userCode":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.loomta.com/auth/device/approve \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-organization-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "userCode": "example" }'Called by the Loomta web app, not by API-key clients. Authenticated with the user’s session and an x-organization-id header selecting the workspace the minted key is scoped to.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-organization-id
required
string format: uuid
The workspace to scope the minted key to.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
userCode
required
The LMT-XXXX-XXXX code shown by the CLI.
string
Examplegenerated
{ "userCode": "example"}Responses
Section titled “Responses”Approved.
Media typeapplication/json
object
status
string
organizationId
string format: uuid
Example
{ "status": "approved"}