Authentication
Exchange a credential for an access token
Changed onThe OAuth 2.0 token endpoint. grant_type picks the exchange:
- client_credentials (RFC 6749 section 4.4): authenticate as a service account, its id as client_id and one of its keys as client_secret, in the form body or as HTTP Basic credentials. The token is a signed JWT that lasts 60 minutes and carries every scope unless scope narrows it. Disabling or revoking the key, or disabling the service account, ends its tokens.
- urn:ietf:params:oauth:grant-type:device_code (RFC 8628 section 3.4): a native client polling for the device login it started, with device_code and its client_id. Answers authorization_pending until the person approves, slow_down when polled sooner than the interval, then the token set, once.
- refresh_token: a native client renewing the tokens a device login gave it, with refresh_token and its client_id. The refresh token is replaced on every use.
post/oauth/token
Request
- Base URL: https://api.app.layer.ai/api
- URL: https://api.app.layer.ai/api/oauth/token
- Auth: none required
Response
Successful Response
Changes
- breaking
the response property
became optional for the status - breaking
response property
scopelist-of-types was widened by adding typesnullto media typeapplication/jsonof response200 - info
added the new optional request property
- info
added the new optional request property
- info
added the optional property
to the response with the status
- breaking
- info
endpoint added
- info