OAuth2

Generate an access token given an authorization code, resource owner password credentials or etc...

Creates an access token for a client application

post/oauth2/token

Request

  • Base URL: https://api.danalock.com
  • URL: https://api.danalock.com/oauth2/token
  • Auth: none declared

Headers

X-Assume-Userstring

Assume the identity of the user in another domain

Request body

grant_typestring

The grant you are requesting.

codestring

Required for the authorization_code grant.

client_idstring

Your OAuth2 client identifier issued by Danalock.

client_secretstring

Your OAuth2 client secret issued by Danalock.

redirect_uristring

Redirect URL, where your user is sent after granting access to you. If

usernamestring

Username for the password grant.

passwordstring

Password for the password grant.

totpstring

Time-based one-time password if two factor authentication is required for login.

refresh_tokenstring

Refresh token for the refresh_token grant.

scopestring

Requested scopes.

Response

Access token

access_tokenstring

JWT access token.

refresh_tokenstring

JWT refresh token.

token_typestring

Access token type.

expires_ininteger

Lifetime in seconds.

Example response

{
  "token_type": "Bearer"
}

Changes

No recorded changes to this operation across all 1 revision of this API.