​Получение списка сеанса аутентификации

Используется для получения списка аутентификаций за определенный период.

Чтобы получить список сеансов аутентификации, сделайте запрос по этому URL:
GET https://one-api.notificore.ru/api/2fa/authentications



Request parameters

Parameter Requires Type Default Description
page[offset] No integer 0 Get auths starting at offset.
page[limit] No integer 10 The number of authentications in the response. Possible values are from 10 to 500.
filter[from] Yes string Period start date (date and time when the authentication session was created) in ISO 8601 format.
filter[to] Yes string End date of the period (date and time when the authentication was created) in ISO 8601 format.
filter[ids] No string Authentication ID. The maximum number is 3.
filter[status] No string Possible values: “pending”, “verified”, “expired”, “failed”, “canceled”.
filter[channel] No string Possible values: “SMS”, “Viber”.
filter[recipient] No string The phone number to which you want to send the OTP code. 9 to 15 digits.
filter[country_code] No string Beneficiary country code according to ISO 3166-1 alpha-2
way No string asc Sort options: asc, desc
sort No string created_at Sort by: id, status, channel, recipient, created_at, finished_at, country_code.


Response parameters

Parameter Type Description
list array An array of authentication objects.
list[]id string The ID of the generated authentication.
list[]recipient string Number of the recipient of the message with the OTP code.
list[]status string Authentication status. Possible values:pending – authentication has been created and is in the pending state;verified – authentication successful (one-time password successfully verified);expired – authentication has expired;failed – authentication failed;canceled – authentication has been canceled.
list[]channel string Channel for authentication.
list[]sender string Sender’s name.
list[]sender_alt string Alternative sender name for SMS.
list[]code_lifetime integer The expiration date of the one-time password.
list[]code_max_tries integer The number of attempts to verify the one-time password.
list[]code_digits integer The number of digits in the one-time password.
list[]price float Authentication session cost.
list[]currency string The three-letter code of the currency in which the authentication cost is indicated.
list[]country_code string Receiver’s country code according to ISO 3166-1 alpha-2.
list[]expired_at string The expiration date of the authentication in ISO 8601 format.
list[]created_at string The date and time of the authentication was created in ISO 8601 format.
list[]finished_at string Date and time when authentication was closed in ISO 8601 format.
list[]messages array Array of message objects:
list[]messages[]id string The unique ID of the message.
list[]messages[]recipient string The recipient’s phone number.
list[]messages[]status string Message status. Possible values: delivered – the message was sent; accepted – message accepted for sending; undelivered – the message was not delivered.
list[]messages[]sender string The name of the sender of the message.
list[]messages[]text string Message text.
list[]messages[]price float Message cost.
list[]messages[]currency string Currency of the account in which the cost is indicated. Corresponds to the user’s account currency.
list[]messages[]sent_at string The date and time of the message was sent in ISO 8601 format.
list[]messages[]created_at string The date and time the message was created in ISO 8601 format.
total integer The total number of authentications.

Ответ в случае успешного запроса:

{
  "data": {
    "list": [
      {
        "id": "ea5db413-e368-4952-b745-cc2030210c49",
        "recipient": "792501403813",
        "status": "verified",
        "channel": "sms",
        "sender": "testsms",
        "sender_alt": "string",
        "message_text": "Your Notificore 2FA confirmation code is {code}. Do not share this with anyone else.",
        "code_lifetime": 30,
        "code_max_tries": 5,
        "code_digits": 6,
        "price": 50.25,
        "currency": "EUR",
        "country_code": "RU",
        "expired_at": "2022-04-28 14:21:16",
        "created_at": "2022-04-28 14:21:16",
        "updated_at": "2022-04-28 14:21:16",
        "finished_at": "2022-04-28 14:21:16",
        "messages": [
          {
            "id": "1ed32701-5d4f-6cfa-ba06-9db3aa8bab68",
            "recipient": "61401629754",
            "status": "accepted",
            "channel": "sms",
            "sender": "SENDER",
            "price": 0.0642918,
            "currency": "EUR",
            "sent_at": "2022-04-18 11:00:30",
            "created_at": "2022-04-18 10:55:35"
          }
        ]
      }
    ],
    "total": 100
  }
}