How to set up a custom gateway?

How to set up a custom gateway?

We want to configure our custom SMS gateway with “Login with phone number” plugin for sending OTP message with that.

  1. First, go to the “Login with phone number” settings page
  2. At part “SMS default gateways”, choose the “custom (Config Your Gateway)”
  3. Select your API method, it can be “POST” or “GET” request.
  4. Put API request headers. It should be a valid JSON structure. for example:
    {"Content-Type" : "application/json"}
  5. 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}"}
  6. 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

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