Approve device authorization
Optionaloptions: Options<never, ThrowOnError, unknown>Log in this device: start a login, report it through onCode, and poll
at the service's interval, slowing down when asked, until the key is
issued.
A denied login throws InvalidRequestError with code
"access_denied". A login that expires, or outlasts timeout
milliseconds, throws GrepvineError.
const { key } = await client.deviceLogin.authorize({
apiKeyName: "build agent",
onCode: ({ user_code, verification_uri_complete }) =>
console.log(`Open ${verification_uri_complete} and enter ${user_code}`),
});
Deny device authorization
Optionaloptions: Options<never, ThrowOnError, unknown>Poll for a device API key
Optionaloptions: Options<never, ThrowOnError, unknown>Start device authorization
Optionaloptions: Options<never, ThrowOnError, unknown>
Logging in devices by approval, reached as
client.deviceLogin.A device calls DeviceLogin.authorize (or
startandpoll) and shows a code; a person approves it withapprovefrom a client that holds a session or an API key, and the device receives an API key of its own.