OTP_EXPECTED

Kayako support two-factor authentication, that can be enabled for a user or for all agents of the instance.

The API service supports the two-factor authentication only for the Basic HTTP authentication scheme. This authentication scheme can include an additional step with use of the one-time password (OTP).

Reason

  • The two-factor authentication is enabled for the user - you are expected to supply the one-time password with the next API request

Solution

  • Supply the OTP, that you should have received, with the next API request in the X-OTP HTTP header or in the _otp argument, as decribed here (be sure to include auth_token in the X-Token HTTP header as well)

Example

{
    "status": 403,
    "errors": [
        {
            "code": "OTP_EXPECTED",
            "message": "To complete authentication you need to provide the one-time password",
            "more_info": "https://developer.kayako.com/api/v1/reference/errors/OTP_EXPECTED"
        }
    ],
    "notifications": [
        {
            "type": "INFO",
            "message": "Two-factor authentication is enabled for your account"
        }
    ],
    "auth_token": "dPQBJfPG5cGYd6MMPtowGz93x3uSN7Vc7yBw3JrKL5owqfowKFda4mezGefo5QDmRnxyV2"
}