@@ -84,42 +84,55 @@ print 'The body of the message was:', message['body']
8484Nexmo's [ Verify API] [ doc_verify ] makes it easy to prove that a user has provided their
8585own phone number during signup, or implement second factor authentication during signin.
8686
87- You can start the verification process by calling the send_verification_request method:
87+ You can start the verification process by calling the start_verification method:
8888
8989``` python
90- response = client.send_verification_request (number = ' 441632960960' , brand = ' MyApp' )
90+ response = client.start_verification (number = ' 441632960960' , brand = ' MyApp' )
9191
9292if response[' status' ] == ' 0' :
93- print ' Started verification' , response[' request_id' ]
93+ print ' Started verification request_id= ' + response[' request_id' ]
9494else :
9595 print ' Error:' , response[' error_text' ]
9696```
9797
98+ The response contains a verification request id which you will need to
99+ store temporarily (in the session, database, url etc).
100+
98101### Controlling a verification
99102
100- To cancel an in-progress verification or to trigger the next attempt to
101- send the confirmation code, call the control_verification_request method :
103+ Call the cancel_verification method with the verification request id
104+ to cancel an in-progress verification :
102105
103106``` python
104- client.control_verification_request(cmd = ' cancel' , request_id = ' 00e6c3377e5348cdaf567e1417c707a5' )
107+ client.cancel_verification(' 00e6c3377e5348cdaf567e1417c707a5' )
108+ ```
109+
110+ Call the trigger_next_verification_event method with the verification
111+ request id to trigger the next attempt to send the confirmation code:
105112
106- client.control_verification_request(cmd = ' trigger_next_event' , request_id = ' 00e6c3377e5348cdaf567e1417c707a5' )
113+ ``` python
114+ client.trigger_next_verification_event(' 00e6c3377e5348cdaf567e1417c707a5' )
107115```
108116
117+ The verification request id comes from the call to the start_verification method.
118+
109119### Checking a verification
110120
111- To check a verification, call the check_verification_request method with
112- the PIN code provided by the user and the id of the verification request :
121+ Call the check_verification method with the verification request id and the
122+ PIN code to complete the verification process :
113123
114124``` python
115- response = client.check_verification_request( code = ' 1234 ' , request_id = ' 00e6c3377e5348cdaf567e1417c707a5 ' )
125+ response = client.check_verification( ' 00e6c3377e5348cdaf567e1417c707a5 ' , code = ' 1234 ' )
116126
117127if response[' status' ] == ' 0' :
118- print ' Verification complete, event ' , response[' event_id' ]
128+ print ' Verification complete, event_id= ' + response[' event_id' ]
119129else :
120130 print ' Error:' , response[' error_text' ]
121131```
122132
133+ The verification request id comes from the call to the start_verification method.
134+ The PIN code is entered into your application by the user.
135+
123136### Start an outbound call
124137
125138Use Nexmo's [ Call API] [ doc_call ] to initiate an outbound voice call by calling
0 commit comments