Skip to main content

Using the API reference page here for sending SMS
https://developers.ringcentral.com/api-reference/SMS/createSMSMessage

 

I click on “try it out”

select Production

Authorize

Then the next time I click on “try it out” it appears I have a token in the code window with CURL.

I Use ~  for accountid and extension.

Then I pick one of the numbers to be a from number

and my personal phone as to

and then cut and paste to a command window to run curl from my local machine.

The result is always this

 

  {
  "errorCode" : "TokenInvalid",
  "message" : "Token not found",
  "errors" : > {
    "errorCode" : "OAU-213",
    "message" : "Token not found"
  } ]
}

When you click the Try it out, could you send the message from the page?

You said that you copy the curl and run it on your command line, how long after that token has been issued? The token is valid for only 1 hr.


Retesting this morning.

Here is the curl and the result.

$ curl --request POST \
  --url 'https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/sms' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer SUFEMDFQMTBQQVMwMHxBQUJMd2pS' \
  --header 'content-type: application/json' \
  --data '{"from":{"phoneNumber":"+1303253XXXX"},"country":{"isoCode":"US"},"to":"{"phoneNumber":"+1612564XXXX"}],"text":"test from Ring"}'

 


{
  "errorCode" : "FeatureNotAvailable",
  "message" : "The requested feature is not available",
  "errors" : r {
    "errorCode" : "MSG-242",
    "message" : "The requested feature is not available"
  } ]
}
 

 


First of all, Do not post sensitive and private info into this public forum. I deleted part of the token and masked the phone numbers in your post.

Now, this is completely a new issue and it’s related to your account SMS TCR campaign registration.

Please read this article and submit a customer support ticket to get help.


Reply