Skip to content

Authorization

Firstly, you have to log in and obtain a JWT token to connect to the API. To do this, you need to make a POST request to https://auth.vumo.ai/login.

Login data format

{
    "username":"FAKE_LOGIN",
    "password":"FAKE_PASSWORD",
    "system":"autography"
}

Example Postman

Example Bash

curl --location --request POST 'https://auth.vumo.ai/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "FAKE_LOGIN",
    "password": "FAKE_PASSWORD",
    "system": "autography"
}'

If the login and password are correct, you will receive a response that looks like this:

Success

{
    "access_token": "FAKE_JWT_TOKEN",
    "refresh_token": "FAKE_JWT_REFRESH_TOKEN",
    "token_type": "bearer",
    "expires_in": 86400
}
name description
access_token is a JWT token which is valid for 86400 seconds (1 day). you have to use it for authentication.
refresh_token is a token (valid for 30 days) used to refresh access_token when it has expired.
token_type token type, in this case it is always 'bearer'.
expires_in shows time in seconds till access_token expires.

Example response if incorrect data was entered:

Error

{
    "status": 403,
    "reason": "Forbidden",
    "errorCode": "INVALID_CREDENTIALS",
    "message": "Wrong username or password, please contact with administrator",
    "timestamp": 1648209841545
}

Refresh access token

Since the access token is only valid for 1 day, you can use refresh_token to refresh access. In order to do so, you need to make a POST request to https://auth.vumo.ai/refresh with your refresh_token.

Example Postman

Example Bash

curl --location --request POST 'https://auth.vumo.ai/refresh' \
--header 'Content-Type: application/json' \
--data-raw '{
    "refresh_token": "FAKE_JWT_REFRESH_TOKEN"
}

'

If the request is correct, you will receive a response with new access_token:

Success

{
    "access_token": "FAKE_JWT_TOKEN",
    "refresh_token": "FAKE_JWT_REFRESH_TOKEN",
    "token_type": "bearer",
    "expires_in": 86400
}

example response when incorrect data was entered:

Error

{
    "status": 400,
    "reason": "Bad Request",
    "errorCode": "INVALID_BODY",
    "message": "Require all parameters: username, password and system"
    "timestamp": 1648209841545
}