مستندات رمز یکبار مصرف وردپرس

Shortcode

Use this shortcode wherever you want to display the login form:

[ otp-login-form ]

REST API

Send OTP

Use this endpoint to send OTP code to a recipient.

POST https://your-domain.com/wp-json/auth/v1/send-otp

Request Parameters

ParameterDefaultRequiredDescription
country_codeNULLfalseThe user's mobile number country code.
mobileNULLfalseUser mobile number.
emailNULLfalseUser email address.

Verify Login

Use this endpoint to verify the OTP code and log in the user.

POST https://your-domain.com/wp-json/auth/v1/login/otp

Request Parameters

ParameterDefaultRequiredDescription
country_codeNULLfalseThe user's mobile number country code.
mobileNULLfalseUser mobile number.
emailNULLfalseUser email address.
otp_codeNULLtrueThe OTP code that sent to user.