This API call retrieves OTP History records based on the specified input parameters.

Examples

Example 1
Fetch all OTP history records ordered by profile_id.

curl --request POST \
--url https://external-api.xtremepush.com/api/external/list/otp-history \
--header 'Content-Type: application/json' \
--data '{
  "apptoken": "your-app-token",
  "order": ["profile_id"],
  "select": [
    "otp_id",
    "integration_id",
    "profile_id",
    "mobile_number",
    "request_ts",
    "sent_ts",
    "delivered_ts",
    "verified_ts",
    "error",
    "source"
  ],
  "offset": 0
}'

Example 2

Retrieve OTP history for a specific user identified by profile_id.

curl --request POST \
--url https://external-api.xtremepush.com/api/external/list/otp-history \
--header 'Content-Type: application/json' \
--data '{
  "apptoken": "your-app-token",
  "condition": [["profile_id", "=", "profileId"]],
  "select": [
    "otp_id",
    "integration_id",
    "profile_id",
    "mobile_number",
    "request_ts",
    "sent_ts",
    "delivered_ts",
    "verified_ts",
    "error",
    "source"
  ],
  "offset": 0
}'

Example 3

Retrieve all OTP history records, sorted by the time of request (request_ts) in descending order.

curl --request POST \
--url https://external-api.xtremepush.com/api/external/list/otp-history \
--header 'Content-Type: application/json' \
--data '{
  "apptoken": "your-app-token",
  "order": ["request_ts DESC"],
  "select": [
    "otp_id",
    "integration_id",
    "profile_id",
    "mobile_number",
    "request_ts",
    "sent_ts",
    "delivered_ts",
    "verified_ts",
    "error",
    "source"
  ],
  "offset": 0
}'
Language
Click Try It! to start a request and see the response here!