ACCESS_TOKEN
with the token you obtained in step 1 before making the following call to the Management API:"name": "sms"
property. Notice that the connection currently displays the Twilio information you provided during the setup process.
options
object to provide information about the SMS Gateway.
options
object with each call; otherwise, you will overwrite the existing data that is not included in subsequent calls.twilio_sid
and twilio_token
parametersprovider
parameter, and set it to sms_gateway
)gateway_url
parameter, and set it to the URL of your SMS gateway. Auth0 must be able to reach this URL for it to use your gateway to send messages on your behalf.options
object:
gateway_authentication
in your options
object, Auth0 adds a JSON Web Token to the Authorization
header whenever it sends requests to your SMS gateway. The token contains the gateway_authentication.subject
and gateway_authentication.audience
values, and is signed with gateway_authentication.secret
.
If your secret is base64-url-encoded, set secret_base64_encoded
to true
.
Once you have updated your connection, Auth0 will send the following to your SMS Gateway every time a user signs up or logs in with your connection.
forward_req_info
property in the options
object to true
, the gateway will also receive information from the HTTP request that initiated the Passwordless process. This includes the IP address of the client calling /passwordless/start
and its User Agent.
/passwordless/start
endpoint will return an HTTP 400 code and a response that looks like the following:
error_description
will be Authentication failed while calling the SMS gateway: 401. (Please note that the error description verbiage is subject to change at any time.)
Auth0 enforces a timeout of 30 seconds for HTTP calls to custom SMS Gateways. If the SMS Gateway fails to reply within this time frame, the /passwordless/start
endpoint will also return an HTTP 400 code. The response will have the format shown above and the error_description
field will be Timeout while calling the SMS gateway: <Timeout Code>. (Again, the error description verbiage is subject to change at any time.)