Login (POST /authorization/token)
OAuth tokens are required to access API resources. This API uses Basic authentication with ApiKey and Secret. Required credentials for this API can be found in the user's account on the web application. For instructions on creating a Bearer token, refer to the <Authentication> section.
Request Parameters
Request Headers
Header | Value | Notes |
---|---|---|
Authorization | Basic {token} | The word "Basic" followed by the base 64 encoded string. E.g. Basic apikey:secret |
app_auth_type | jsign-oauth2 |
Request Body
Field | Type | Required | Description |
---|---|---|---|
String | Yes | User email | |
password | String | Yes | User password |
Response Parameters
Response Body Message Field
Field | Value |
---|---|
message | The returned message containing the token |
Response Body Data Fields
Field | Always Preset | Notes |
---|---|---|
access_token | Yes | |
refresh_token | Yes | |
token_type | Yes | |
expires_in | Yes | Expiration time in UNIX timestamp |
Sample Success Response
REQUEST:
curl --location --request POST '/api/v2.0/authorization/token' \
--header 'app_auth_type: jsign-oauth2' \
--header 'Authorization: Basic ODk3MTY5ZGItMWNiYi00MWIxLTk2ZDYtYjc0M2RkNWI5ZTY4OmNqNWFXam5ldEo=' \
--data-raw ''
RESPONSE:
{
"message": "",
"data": {
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.ey [....]",
"refresh_token": "zf3bdBMbHc1gQW5sJbof8EfNLdRe0mbjP1BsQFLEINc=",
"token_type": "bearer",
"expires_in": 1618927271
}
}
Sample Error Response
REQUEST:
curl --location --request POST '/api/v2.0/authorization/token' \
--header 'app_auth_type: jsign-oauth2' \
--data-raw ''
RESPONSE:
{
"errors": [
{
"error_code": "UNAUTHORIZED", "
developer_message": "Client credentials are required."
}
]
}
Note: View the full list of applicable error code for this method here.