Hi I could not get sms with OTP via nexmo provide...
# ory-selfhosting
p
Hi I could not get sms with OTP via nexmo provider How can i do it correctly how should I provide additional fields that required by nexmo is it correct? I have body like this
Copy code
function(ctx) {
  from: "XXXXXXXXX",
  to: ctx.recipient,
  text: ctx.body,
  channel: "sms",
}
courier:
  channels:
    - id: sms
      type: http
      request_config:     
       
        url: <https://api.nexmo.com/v1/messages>
        
        method: POST
        headers:
          Content-Type: application/json
          Authorization: Basic XXXXXXXXX
        body: <base64://ZnVuY3Rpb24oY3R4KSB7CiAgIkZyb20iOiAiKzM4MDY3MTYzNjA5IiwKICJ0byI>6ICJjdHguUmVjaXBpZW50IiwKICJ0ZXh0IjogImN0eC5Cb2R5IiwKICJtZXNzYWdlX3R5cGUiOiAidGV4dCIsCiAgImNoYW5uZWwiOiAic21zIgp9


        auth:
         type: api_key
         config:
           name: NEXMO_API_KEY
           value: XXXXXX
           in: header
b
Hi, what fields does Nexmo require?
p
message_type: "text", hannel: "sms", my body is unction(ctx) { from: "XXXXXX", to: ctx.recipient, text: ctx.body, message_type: "text", channel: "sms", }
b
The body you posted evaluates to
Copy code
function(ctx) {
  "From": "XXX",
 "to": "ctx.Recipient",
 "text": "ctx.Body",
 "message_type": "text",
  "channel": "sms"
}
Note the uppercase "F" in "From".
p
Thanks🙏