API Endpoint Plivo’s Session API is a simple REST interface for sending and validating one-time passwords (OTP) for two-factor authentication (2FA) using SMS and voice channels.
POST
https://api.plivo.com/v1/Account/{auth_id}/Verify/

Authentication

All requests to the Verify API are authenticated with BasicAuth using your Auth ID and Auth Token, which you can find on the Overview page of the Plivo console.

Content-Type

Plivo only accepts input of the type application/json. All POST requests arguments must be passed as json with the Content-Type set as application/json. All GET and DELETE request arguments must be passed in the query string.

Timeouts and Proxies

The server SDKs provide for specifying timeouts and proxy settings to be used while making API requests. In the code window, select the programming language of your choice and click on the latest version to see how to specify these settings.

API Response

All Plivo API endpoints return a response in JSON format. An api_id in each response uniquely identifies each request. The API returns one of these HTTP status codes depending on whether the API call is successful or not.
200

Request has been executed

201

Resource created

202

Resource changed

204

Resource deleted

400

A parameter is missing or is invalid

401

Authentication failed

404

Resource cannot be found

405

HTTP method is not allowed

429

You are sending too many requests

500

Server error