Parameter [text] value is invalid

  • 1
  • Question
  • Updated 2 years ago
Got a "Parameter [text] value is invalid" response message when trying to send SMS via API, what could be the cause of this?

There was a linefeed character in the text, I removed it by formatting the text via code but still the error persist.
Photo of adcdc

adcdc

  • 212 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,622 Points 5k badge 2x thumb
Please provide your complete request and response (along with headers).

Have you tried using just a simple text string? The "text" property must be: Text of a message. Max length is 1000 symbols (2-byte UTF-16 encoded). If a character is encoded in 4 bytes in UTF-16 it is treated as 2 characters, thus restricting the maximum message length to 500 symbols.

You can see the documentation for this API resource here: https://developers.ringcentral.com/api-docs/latest/index.html#!#RefSMSMessages.html