{"Status":true,"Message":"","Response":{"post":{"postuid":"b2769aab-0766-434c-8188-29e834c80358","tenantuid":"d8b744fc-2e70-4089-bb80-dd1d08f6c7b2","projectuid":"542e5f51-33cf-401f-aebe-4324ebe36fe4","title":"Validate One Time Password","slug":"reference/validate-one-time-password","html":"\u003Cp\u003EThe Validate \u003Cb\u003EOne Time Password (OTP)\u003C/b\u003E API is used to verify a 4\u20136 digit numeric \u003Ca href=\u0022https://www.dailystory.com/glossary/otp/\u0022\u003Eone-time password\u003C/a\u003E that was sent to a contact through the \u003Ca href=\u0022/reference/send-one-time-password\u0022\u003ESend One-Time Password API\u003C/a\u003E.\u003C/p\u003E\u003Cp\u003EAn OTP remains valid for 15 minutes after it is generated.\u003C/p\u003E\u003Ch3 id=\u0022retry_attempts_and_lockout\u0022\u003ERetry attempts and lockout\u003C/h3\u003E\u003Cp\u003EBy default, an incorrect OTP immediately invalidates the cached code and the contact must request a new OTP. Set \u003Cb\u003Eallow_retry=true\u003C/b\u003E to permit multiple incorrect attempts before the OTP is invalidated. When retry is enabled, the response includes \u003Cb\u003Eremaining_attempts\u003C/b\u003E so the caller can show the user how many attempts they have left.\u003C/p\u003E\u003Cp\u003EIf the contact exceeds the maximum number of failed attempts (default 5, configurable via \u003Cb\u003Eretry_attempts\u003C/b\u003E), the API returns HTTP \u003Cb\u003E429\u003C/b\u003E with \u003Cb\u003Elocked: true\u003C/b\u003E and a \u003Cb\u003Elockout_seconds\u003C/b\u003E value indicating how long until the contact may request or validate a new OTP.\u003C/p\u003E\u003Cdiv class=\u0022api_header\u0022\u003EPath Parameters\u003C/div\u003E\u003Csection class=\u0022api_parameters\u0022\u003E\u003Csection class=\u0022api_param\u0022\u003E\u003Cdiv class=\u0022api_param_header\u0022\u003E\u003Cspan class=\u0022p_name\u0022\u003Edsid\u003C/span\u003E\u003Cspan class=\u0022p_type\u0022\u003Estring\u003C/span\u003E\u003Cspan class=\u0022p_isrequired\u0022\u003Erequired\u003C/span\u003E\u003C/div\u003E\u003Cdiv\u003EThe unique DailyStory ID (dsid) for the contact whose OTP is being validated. The dsid is returned when the Send One Time Password API is used.\u003C/div\u003E\u003C/section\u003E\u003C/section\u003E\u003Cdiv class=\u0022api_header\u0022\u003EQuery Parameters\u003C/div\u003E\u003Csection class=\u0022api_parameters\u0022\u003E\u003Csection class=\u0022api_param\u0022\u003E\u003Cdiv class=\u0022api_param_header\u0022\u003E\u003Cspan class=\u0022p_name\u0022\u003Eotp\u003C/span\u003E\u003Cspan class=\u0022p_type\u0022\u003Estring\u003C/span\u003E\u003Cspan class=\u0022p_isrequired\u0022\u003Erequired\u003C/span\u003E\u003C/div\u003E\u003Cdiv\u003EThe One Time Password (OTP) sent to the contact\u0027s mobile phone or email address.\u003C/div\u003E\u003C/section\u003E\u003Csection class=\u0022api_param\u0022\u003E\u003Cdiv class=\u0022api_param_header\u0022\u003E\u003Cspan class=\u0022p_name\u0022\u003Eminutes_valid\u003C/span\u003E\u003Cspan class=\u0022p_type\u0022\u003Enumber\u003C/span\u003E\u003C/div\u003E\u003Cdiv\u003EOptionally provide a value between 3 and 20 to override the default validity window in minutes. Must match the value used when the OTP was sent. Defaults to 15.\u003C/div\u003E\u003C/section\u003E\u003Csection class=\u0022api_param\u0022\u003E\u003Cdiv class=\u0022api_param_header\u0022\u003E\u003Cspan class=\u0022p_name\u0022\u003Eallow_retry\u003C/span\u003E\u003Cspan class=\u0022p_type\u0022\u003Eboolean\u003C/span\u003E\u003C/div\u003E\u003Cdiv\u003EWhen true, an incorrect OTP does not immediately invalidate the cached code; the caller may retry until retry_attempts is exhausted. Defaults to false.\u003C/div\u003E\u003C/section\u003E\u003Csection class=\u0022api_param\u0022\u003E\u003Cdiv class=\u0022api_param_header\u0022\u003E\u003Cspan class=\u0022p_name\u0022\u003Eretry_attempts\u003C/span\u003E\u003Cspan class=\u0022p_type\u0022\u003Enumber\u003C/span\u003E\u003C/div\u003E\u003Cdiv\u003EThe number of incorrect attempts allowed before the OTP is invalidated and the contact is locked out. Must be between 1 and 10. Only applies when allow_retry=true. Defaults to 5.\u003C/div\u003E\u003C/section\u003E\u003C/section\u003E\u003Cdiv class=\u0022api_header\u0022\u003EHTTP Response Examples\u003C/div\u003E\u003Cdiv class=\u0022code_wrapper\u0022\u003E\u003Cdiv class=\u0022d-flex header\u0022\u003E\u003Cspan class=\u0022httpstatus\u0022\u003E\u003Cspan class=\u0022solid-circle success\u0022\u003E\u003C/span\u003E200\u003C/span\u003E\u003Cspan\u003EValid\u003C/span\u003E\u003C/div\u003E\u003Cdiv class=\u0022code\u0022 data-language=\u0022json\u0022\u003E{\r\n  \u0026quot;Status\u0026quot;: true,\r\n  \u0026quot;Message\u0026quot;: \u0026quot;The OTP is valid.\u0026quot;,\r\n  \u0026quot;Response\u0026quot;: {}\r\n}\u003C/div\u003E\u003C/div\u003E\u003Cdiv class=\u0022code_wrapper\u0022\u003E\u003Cdiv class=\u0022d-flex header\u0022\u003E\u003Cspan class=\u0022httpstatus\u0022\u003E\u003Cspan class=\u0022solid-circle warning\u0022\u003E\u003C/span\u003E400\u003C/span\u003E\u003Cspan\u003EInvalid (with allow_retry)\u003C/span\u003E\u003C/div\u003E\u003Cdiv class=\u0022code\u0022 data-language=\u0022json\u0022\u003E{\r\n  \u0026quot;Status\u0026quot;: false,\r\n  \u0026quot;Message\u0026quot;: \u0026quot;The OTP is invalid.\u0026quot;,\r\n  \u0026quot;Response\u0026quot;: {\r\n    \u0026quot;remaining_attempts\u0026quot;: 3\r\n  }\r\n}\u003C/div\u003E\u003C/div\u003E\u003Cdiv class=\u0022code_wrapper\u0022\u003E\u003Cdiv class=\u0022d-flex header\u0022\u003E\u003Cspan class=\u0022httpstatus\u0022\u003E\u003Cspan class=\u0022solid-circle warning\u0022\u003E\u003C/span\u003E429\u003C/span\u003E\u003Cspan\u003ELocked Out\u003C/span\u003E\u003C/div\u003E\u003Cdiv class=\u0022code\u0022 data-language=\u0022json\u0022\u003E{\r\n  \u0026quot;Status\u0026quot;: false,\r\n  \u0026quot;Message\u0026quot;: \u0026quot;The maximum number of unsuccessful OTP attempts was exceeded. OTP requests are temporarily locked.\u0026quot;,\r\n  \u0026quot;Response\u0026quot;: {\r\n    \u0026quot;locked\u0026quot;: true,\r\n    \u0026quot;remaining_attempts\u0026quot;: 0,\r\n    \u0026quot;lockout_seconds\u0026quot;: 7200\r\n  }\r\n}\u003C/div\u003E\u003C/div\u003E\u003Cdiv class=\u0022api_header\u0022\u003EHTTP Response Parameters\u003C/div\u003E\u003Csection class=\u0022api_parameters\u0022\u003E\u003Csection class=\u0022api_param\u0022\u003E\u003Cdiv class=\u0022api_param_header\u0022\u003E\u003Cspan class=\u0022p_name\u0022\u003EResponse.remaining_attempts\u003C/span\u003E\u003Cspan class=\u0022p_type\u0022\u003Enumber\u003C/span\u003E\u003C/div\u003E\u003Cdiv\u003EReturned on a failed validation when allow_retry=true. The number of incorrect attempts remaining before the OTP is invalidated.\u003C/div\u003E\u003C/section\u003E\u003Csection class=\u0022api_param\u0022\u003E\u003Cdiv class=\u0022api_param_header\u0022\u003E\u003Cspan class=\u0022p_name\u0022\u003EResponse.locked\u003C/span\u003E\u003Cspan class=\u0022p_type\u0022\u003Eboolean\u003C/span\u003E\u003C/div\u003E\u003Cdiv\u003EReturned with HTTP 429. Indicates the contact has exceeded the maximum number of failed verification attempts and is temporarily locked out.\u003C/div\u003E\u003C/section\u003E\u003Csection class=\u0022api_param\u0022\u003E\u003Cdiv class=\u0022api_param_header\u0022\u003E\u003Cspan class=\u0022p_name\u0022\u003EResponse.lockout_seconds\u003C/span\u003E\u003Cspan class=\u0022p_type\u0022\u003Enumber\u003C/span\u003E\u003C/div\u003E\u003Cdiv\u003EReturned with HTTP 429. The remaining lockout duration in seconds before the contact may request or validate a new OTP.\u003C/div\u003E\u003C/section\u003E\u003C/section\u003E\u003Cp\u003EThe API will respond with an HTTP 200 code to indicate the OTP is valid. If the OTP is invalid, the API will respond with an HTTP 400.\u003C/p\u003E","json_meta":{"api_verb":"GET","api_path":"https://us-1.dailystory.com/api/v1/verification/{dsid}"},"publish_status":0,"post_type":"API","authoruid":"3dde8c16-763a-4a2b-ae0b-1d8c50c62e3d","author":{"authoruid":"3dde8c16-763a-4a2b-ae0b-1d8c50c62e3d"},"featured_image_updating":false,"meta_description":"Below are some details about the parameters.","display_toc":true,"has_workingcopy":false,"allow_indexing":true,"total_views":14,"date_published":"2025-09-19T19:52:00","date_updated":"2026-04-17T13:44:42.58","date_created":"2025-09-18T22:45:09.347"}}}