Skip to main content

Authenticate

Authenticate with user and password/token.

Parameters

Details

The response will provide a session token, that must be used in the header of the messages for queries. When using client libraries, the token is handled automatically.

See GenerateToken for using tokens.

Examples

Authenticate to the db with user and password:


[{
"Authenticate": {
"username": "john",
"password": "love4Aperture!"
}
}]

Tokens shown here are from a session, and yours will differ in value, but will have the same length and prefix.


[{
"Authenticate": {
"status": 0,
"session_token": "adbs_Z2nOUCAE37tlfcPUdeNGE5wtMRZvFYUn6iv",
"session_token_expires_in": 36000,
"refresh_token": "adbr_TxchBKOyerwLEbNnnhuoxtzSuC8ag0u9j5O",
"refresh_token_expires_in": 360000
}
}]

Authenticate to the db with user and token:


[{
"Authenticate": {
"username": "john",
"token": "adbp_jZ1QTOfDs0RrvzMzd5vSsLEcRintc14zlN9"
}
}]

These values also are from an actual session, and yours will have the same format.


[{
"Authenticate": {
"status": 0,
"session_token": "adbs_Z2nOUCAE37tlfcPUdeNGE5wtMRZvFYUn6iv",
"session_token_expires_in": 36000,
"refresh_token": "adbr_TxchBKOyerwLEbNnnhuoxtzSuC8ag0u9j5O",
"refresh_token_expires_in": 360000
}
}]