2Factor provides with an option to set a callback URL, which would be hit by 2Factor Application to acknowledge the delivery of OTP.
This feature is useful for pulling status of delivery over remote URL, in Real-time.
Parameters passed over callback URL:
--------------------------------------------------------------------------------------------------------------
SMS OTP:
2Factor makes a POST request to the callback URL you have set in the control panel ( Here )
POST parameters,
- mode: SMS_OTP
- SessionId: c8e46da6-7b5c-4515-a3b2-83bf045cce44
- To: 1234567890
- Status: DELIVERED
Parameter meaning,
- mode: Indicates the mode via which OTP was delivered
- SessionId: SessionId generated at the time of executing an API
- To: Phone number to which OTP was sent
- Status: Status of OTP delivery. ( FAILED / DELIVERED )
Status values:
FAILED: Unable to deliver message
REJECTED: Message was rejected by operator
DELIVERED: Message was delivered to the user
--------------------------------------------------------------------------------------------------------------
VOICE OTP:
2Factor makes a POST request to the callback URL you have set in the control panel ( Here )
POST parameters,
- mode=VOICE_OTP
- SessionId=17d7a58c-c04b-4b94-a8e8-a56a7f956231
- To=1234567890
- Status=DELIVERED
- api_request_time=2015-11-25+13%3A21%3A34
- call_start_time=2015-11-25+13%3A21%3A41
- call_end_time=2015-11-25+13%3A21%3A44
- callDetailStatus=DELIVERED
Parameter meaning,
- mode: Indicates the mode via which OTP was delivered
- SessionId: SessionId generated at the time of executing an API
- To: Phone number to which OTP was sent
- Status: Status of OTP delivery. ( FAILED / DELIVERED )
- api_request_time: Time at which API request was processed
- call_start_time: Time at which call is started
- call_end_time: Time at which call is ended
- callDetailStatus: Status of OTP delivery as FAILED / REJECTED / DELIVERED / DELIVERED (USR_BUSY) / DELIVERED (USR_NOT_PICKD) / DELIVERED (USR_TMP_UNAVLBL)
callDetailStatus values:
- FAILED: Unable to deliver call
- REJECTED: Call was rejected by operator
- DELIVERED: Call was delivered to the user
- DELIVERED (USR_BUSY): Call was dialed to the user, user cancelled / rejected incoming call
- DELIVERED (USR_NOT_PICKD): Call was ringing at user's device, user did not pickup the call
- DELIVERED (USR_TMP_UNAVLBL): Operator reported number could not be reached / ABSENT SUBSCRIBER