Skip to main content

Search

Adding a New Line in SMS Using Vonage REST API

Comments

3 comments

  • Avatar
    ETShort Code

    When we add %0A to the msg and Encode it to pass it to the Rest API it does not work, Rather just shows "%0A" in the content of the msg. What to do ?

    0
  • Avatar
    Divya Manjunath

    Hello,

    The complete URL should look like:

    "api_key=KEY&api_secret=SECRET&from=Nexmo&to=44123456789&text=Thank+you.%0Athis+is+a+new+line"

    I am guessing when you are encoding the string, it is double encoding the already encoded "%0A", so "%0A" becomes "%250A", its encoding the "%" which becomes "%25" giving you the "%250A" rather then the "%0A".

    Hope this helps.

    Kyle Hudson

    0
  • Avatar
    Apun Ahmed

    I am trying to send text "TEST %0A line break + lets see how it shows."

     

    If i do URLENCODE it shows + but no line break.

     

    If i do HTMLENCODE it shows line break but no +

     

    if i implement it it htmlencode first and url encode again no line break.

     

    Can you help ?

    0

Please sign in to leave a comment.