Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.

Commit bd4fcb4

Browse files
committed
Update README with links to Verify V2
1 parent 7a0073b commit bd4fcb4

File tree

1 file changed

+4
-62
lines changed

1 file changed

+4
-62
lines changed

README.md

Lines changed: 4 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -225,67 +225,9 @@ To simplify the process of handling a request, you can set a callback URL in the
225225

226226
## <a name="phone-verification"></a>Phone Verification
227227

228-
Authy has an API to verify users via phone calls or sms. Also, user phone information can be gethered
229-
for support and verification purposes. You do not need the user ID to perform phone verification.
228+
[Phone verification now lives in the Twilio API](https://www.twilio.com/docs/verify/api) and has [Python support through the official Twilio helper libraries](https://www.twilio.com/docs/libraries/python).
230229

231-
### Phone Verification Start
232-
233-
In order to start a phone verification, we ask the API to send a token to the user via sms or call:
234-
235-
```python
236-
request = authy_api.phones.verification_start(phone_number, country_code, via='sms')
237-
238-
print request.content
239-
240-
# {u'uuid': u'1785f5b0-1234-1234-1234-1285ca17e122', u'success': True, u'seconds_to_expire': 587, u'is_cellphone': True, u'carrier': u'AT&T Wireless', u'message': u'Text message sent to +1 123-456-7890.'}
241-
```
242-
243-
Optionally you can specify the language that you prefer the phone verification message to be sent. Supported
244-
languages include: English (`en`), Spanish (`es`), Portuguese (`pt`), German (`de`), French (`fr`) and
245-
Italian (`it`). If not specified, English will be used.
246-
247-
```python
248-
# This will send a message in spanish
249-
authy_api.phones.verification_start(phone_number, country_code, via='sms', locale='es')
250-
```
251-
252-
### Phone Verification Check
253-
254-
Once you get the verification from user, you can check if it's valid with:
255-
256-
```python
257-
check = authy_api.phones.verification_check(phone_number, country_code, verification_code)
258-
259-
print check.ok()
260-
# True
261-
```
262-
263-
If `.ok()` returns false, `.content()` will provide useful information:
264-
265-
```
266-
print check.content
267-
268-
# wrong code:
269-
# {u'message': u'Verification code is incorrect', u'errors': {u'message': u'Verification code is incorrect'}, u'error_code': u'60022', u'success': False}
270-
271-
# no verifications pending:
272-
# {u'message': u'No pending verifications for +1 321-345-1234 found.', u'errors': {u'message': u'No pending verifications for +1 123-456-7890 found.'}, u'error_code': u'60023', u'success': False}
273-
```
274-
275-
## <a href name="phone-intel"></a>Phone Intelligence
276-
277-
If you want to gather additional information about user phone, use the phone intelligence API.
278-
279-
```python
280-
phone_intel = authy_api.phones.info(phone_number, country_code)
281-
282-
if phone_intel.ok():
283-
print phone_intel.content
284-
285-
# {u'ported': False, u'message': u'Phone number information as of 2018-01-05 00:49:41 UTC', u'type': u'cellphone', u'success': True, u'provider': u'AT&T Wireless'}
286-
```
287-
288-
## <a href name="app-info"></a>Application Info
230+
[Legacy (V1) documentation here.](verify-legacy-v1.md)
289231

290232
### Details
291233

@@ -321,8 +263,8 @@ else:
321263

322264
You can find the full API documentation in the official documentation.
323265

324-
* [Authy (2FA)](https://www.twilio.com/docs/api/authy)
325-
* [Phone Verification](https://www.twilio.com/docs/api/verify)
266+
* [Authy (2FA)](https://www.twilio.com/docs/authy/api)
267+
* [Phone Verification](https://www.twilio.com/docs/verify/api)
326268

327269
## Contributing
328270

0 commit comments

Comments
 (0)