I am integrating the passwordless sms connection for my application with my own sms-gateway provider. However the request body accepted by my sms-gateway provider is different than what auth0 posts. Is there any way I can define the request body posted to my sms-gateway for passwordless sms.
For eg., the request body posted by auth0 is as follows:
{
“recipient”: “+1 399 999”,
“body”: “Your verification code is: 12345”,
“sender”: “+1 234 567”
}
Following is the sample Curl requests for my sms-gateway provider:
curl -X “POST” “https://rest.nexmo.com/sms/json”
-d “from=AcmeInc”
-d “text=A text message sent using the Nexmo SMS API”
-d “to=$TO_NUMBER”
-d “api_key=$API_KEY”
-d “api_secret=$API_SECRET”
or
curl -X POST https://api.nexmo.com/v0.1/messages
-u “$NEXMO_API_KEY:$NEXMO_API_SECRET”
-H ‘Content-Type: application/json’
-H ‘Accept: application/json’
-d $‘{
“from”: { “type”: “sms”, “number”: "’$FROM_NUMBER’" },
“to”: { “type”: “sms”, “number”: “‘$TO_NUMBER’” },
“message”: {
“content”: {
“type”: “text”,
“text”: “This is an SMS sent from the Messages API”
}
}
}’