​Отмена сеанса аутентификации
Используется для отмены процесса аутентификации. В этом случае аутентификация должна находиться в статусе "ожидание".
Чтобы отменить сеанс аутентификации, отправьте запрос по этому URL:
POST https://one-api.notificore.ru/api/2fa/authentications/{id}/cancel
Request parameters
ParameterRequiresTypeDefaultDescription
idYesstringNoAuthentication ID received in response to https://one-api.notificore.ru/api/2fa/authentications/otp. The maximum length is 36 characters.
Response parameters
ParameterTypeDescription
idstringThe ID of the generated authentication.
recipientstringNumber of the recipient of the message with the OTP code.
statusstringAuthentication status. Possible values: canceled.
channelstringChannel for authentication.
senderstringSender’s name.
sender_altstringAlternate SMS sender name
message_textstringMessage text.
code_lifetimeintegerOTP expiration date.
code_max_triesintegerThe number of OTP check attempts.
code_digitsintegerThe number of digits in the OTP.
pricefloatAuthentication session cost. If authentication is canceled, the cost will be 0.
currencystringThe three-letter code of the currency in which the cost is indicated.
country_codestringReceiver’s country code according to ISO 3166-1 alpha-2.
expired_atstringDate and time when the authentication session expires in ISO 8601 format.
created_atstringThe date and time of the authentication session was created in ISO 8601 format.
finished_atstringDate and time when the authentication session was closed in ISO 8601 format.
Response example

Ответ в случае успешного запроса:
{
  "data": {
    "id": "bf4381c8-9d4a-4705-bd28-f89a830b7f96",
    "recipient": "792979965073",
    "status": "canceled",
    "channel": "sms",
    "sender": "SENDER",
    "sender_alt": "SENDER_ALT",
    "message_text": "Your verification code: {code}",
    "code_lifetime": 300,
    "code_max_tries": 3,
    "code_digits": 5,
    "price": "0,02",
    "currency": "USD",
    "country_code": "RU",
    "expired_at": "2023-01-04 18:37:06",
    "created_at": "2023-01-04 17:37:06",
    "finished_at": "2023-01-04 17:37:06"
  }
}
Codes of errors
CodeErrorDescription
404Authentication not foundThis error can occur when the authentication identifier is specified incorrectly or the specified authentication is not present in the system. Please ensure that you are using the correct authentication identifier and try again.
422Authentication failed statusThis error can occur when attempting to cancel an authentication session that is already completed with a “failed” status. It is only possible to cancel an authentication session while it is in the “pending” status.
422Authentication expiredThis error can occur when attempting to cancel an authentication session that is already completed with an “expired” status. It is only possible to cancel an authentication session while it is in the “pending” status.