The Login with phone number plugin APIS

1.Login/register

url: [your-domain]/wp-json/login-with-phone-number/v1/login

method: GET

body:

username:

here you send phone number with country code:

Request body example:

{
  "username": 12124567890,
  "method":"custom"
}

Response body example:

{
  "success": true,
  "ID": 2,
  "authWithPass": false,
  "message": "Message sent!",
  "phone_number": 12124567890,
  "showPass": false
}

2.Verify

url: [your-domain]/wp-json/login-with-phone-number/v1/verify

method: GET

body:

phone_number: here you send phone number with country code like above example.

Request body example:

{
  "phone_number": 12124567890,
  "secod": 123456
}

{
  "success": false,
  "phone_number": "12124567890",
  "message": "Activation code is Wrong!"
}

or

{
  "success": true,
  "loggedin" true,

  "phone_number": "12124567890",
  "message": "loading...",
  "token" xxxxxxxxxxxxxxxxxxxxxxxxxxx,
  "user_id": 2
}

Leave a Reply

Your email address will not be published. Required fields are marked *