OAuth
DAB API authorization is based on OAuth 2.0 implementation. Application can login by using username and password, or with security key and token.
NOTE: When login with username & password, token will expire in 3600 seconds. If login with security key pair, token will expire in 60 days. For every successful login, previous JWT token will be void.
User Login:
URL
{network}/users/login
METHOD: Post
REQUEST PARAMS (Use API Key & Secret):
api-key (REQUIRED)
string
api-secret (REQUIRED)
string
REQUEST PARAMS (User username & password):
username (REQUIRED)
string
password (REQUIRED)
string
RESPONSE BODY:
token_type
string
use this alone with token as authorization on the headers for all actions
refresh_token
string
use this alone with token as authorization on the headers to request a new token
token
string
use this alone with token_type as authorization on the headers for all actions
token_expire
integer
amount of seconds token will expire
token_expires_at
integer
timestamp which token will expire at
email
string
username
string
first_name
string
last_name
string
company
string
Refresh Token:
URL
{network}/users/refresh/{refresh_token}
METHOD: GET
REQUEST PARAMS:
refresh_token (REQUIRED)
string
RESPONSE BODY:
token_type
string
use this alone with token as authorization on the headers for all actions
refresh_token
string
use this alone with token as authorization on the headers to request a new token
token
string
use this alone with token_type as authorization on the headers for all actions
token_expire
integer
amount of seconds token will expire
token_expires_at
integer
timestamp which token will expire at
email
string
username
string
first_name
string
last_name
string
company
string
Logout:
URL
{network}/users/logout
METHOD: GET
Token header is required
RESPONSE BODY:
success
boolean