question

adcdc1183 avatar image
adcdc1183 asked ·

Parameter [text] value is invalid

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.
topic-default
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image
benjamin-dean answered ·
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
Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Anirban Sen Chowdhary avatar image
Anirban Sen Chowdhary answered ·

You need to provide a snippet of you text what you are trying to send. There should not be any issues in a normal case if you text is within the allowed range.

Without getting a snippet of your text it's very difficult to assume what is going wrong.

Here is a very basic sample to API body of SMS API :

Body:

{"from":{"phoneNumber":"<your phone From number>"},"to":[{"phoneNumber":"<your To phone number>"},{"phoneNumber":"<your To phone number>"}],"text":"Test sms test"}

Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.