We want to configure our custom SMS gateway in Login with phone number WordPress plugin for sending OTP message with that.
- First, go to the “Login with phone number” settings page
- At part “SMS default gateways”, choose the “custom (Config Your Gateway)”
- Select your API method, it can be “POST” or “GET” request.
- Put API request headers. It should be a valid JSON structure. for example:
{"Content-Type" : "application/json"}
- Put API request body. It also should be a valid JSON structure. It should be based on your SMS gateway documentation. for example:
{"message" : "${message}","phoneNumber" : "${phone_number}"}
- At last, enter and customize SMS text, I mean the ${message}. you can use ${code} inside “Custom API SMS text”. For example it can be:
Hello dear, Your code to login is: ${code}
Leave a Reply