Skip to main content
Solved

errorCode":"CMN-101 - Parameter [from] value is invalid. - Callout not working in Developer Console

  • October 25, 2024
  • 6 replies
  • 72 views

Forum|alt.badge.img

I keep getting the error : "errorCode":"CMN-101","message":"Parameter [from] value is invalid." from my callout. So I attempted to make the same one in the Developer Console UI and I get the same error.

So this leads me to believe that it has something to do with how the from message is configured somewhere but I need some help understanding what I need to do to get a from phone number that I can use for Sending A2P Send SMS Api.

I checked the Admin Portal and in the TCR Registration it has the number as a Campaign User and Ready for Use and the title says SMS enabled numbers.

Any idea of how I might be able to resolve?

Thank you in advance

Robert

Best answer by PhongVu

Nashville wrote:

Thank you for your reply:

I am using the Send A2P SMS - found at this page: https://developers.ringcentral.com/api-reference/High-Volume-SMS/createA2PSMS

The endpoint : https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/a2p-sms/batches

Here is the Developer Console attempt:

 



 

 

Are you sure that the “from” number is an A2P SMS number?

View original
Did this thread help you find an answer to your question?

6 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2317 replies
  • October 25, 2024

You mentioned “callout” and “A2P SMS”, which API did you call? Please share some code snippets.


Forum|alt.badge.img
  • Author
  • New Participant
  • 4 replies
  • October 25, 2024

Thank you for the reply and question.

I am using the API Send A2P SMS (https://developers.ringcentral.com/api-reference/High-Volume-SMS/createA2PSMS)

The endpoint is  https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/a2p-sms/batches

I tried it in the Developer Console and here is the screenshot:

 


Here is my code in Apex:

 

Here is what I am sending in the body

 

{
   "text":"Welcome to the XXX Community Platform. You can go to the site at https://XXXXXXXXXXX--robert.sandbox.my.salesforce.com/client/s/to check the status of your account.",
   "messages":[
      {
         "to":[
            "+1931XXXXXXX"
         ],
         "text":"Welcome to the XXX Community Platform. You can go to the site at https://slpattorney--robert.sandbox.my.salesforce.com/client/s/to set up your user account. Your user name is: robert.davis+testcomm1@XXX.com."
      },
      {
         "to":[
            "+1931XXXXXXX"
         ],
         "text":"Welcome to the XXX Community Platform. You can go to the site at https://XXXXXXXXXX--robert.sandbox.my.salesforce.com/client/s/to set up your user account. Your user name is: none@none.com."
      }
   ],
   "from":"+1424XXXXXXX"
}

Thank you again


Forum|alt.badge.img
  • Author
  • New Participant
  • 4 replies
  • October 25, 2024

Thank you for your reply:

I am using the Send A2P SMS - found at this page: https://developers.ringcentral.com/api-reference/High-Volume-SMS/createA2PSMS

The endpoint : https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/a2p-sms/batches

Here is the Developer Console attempt:

 



 

 


PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2317 replies
  • Answer
  • October 25, 2024
Nashville wrote:

Thank you for your reply:

I am using the Send A2P SMS - found at this page: https://developers.ringcentral.com/api-reference/High-Volume-SMS/createA2PSMS

The endpoint : https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXXX/a2p-sms/batches

Here is the Developer Console attempt:

 



 

 

Are you sure that the “from” number is an A2P SMS number?


Forum|alt.badge.img
  • Author
  • New Participant
  • 4 replies
  • October 28, 2024

That apparently is the question I need to answer. Trying to work through whether it is or not with RingCentral. Thank you.


PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2317 replies
  • October 28, 2024
Nashville wrote:

That apparently is the question I need to answer. Trying to work through whether it is or not with RingCentral. Thank you.

You can detect that yourself. See this dev guide article for the example code.

Or try this API from the API reference.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings