question

siva rama krishna kumar avatar image
siva rama krishna kumar asked Phong Vu answered

having issue when trying to send sms using jwt token

iam trying to test sms call via code got this error

# POST BODY
body = {
                 
"from": {
                 
"phoneNumber": "+1929415xxxx"
},
"to": [
{
                 
"phoneNumber": "+1929378xxxx"
}
],
"text": "test api call",
}


rcsdk = SDK(RC_CLIENT_ID,RC_CLIENT_SECRET,RC_SERVER_URL)
platform = rcsdk.platform()
try:
# Assuming platform.login() logs in using the token
platform.login(jwt=jwt_token)
# Assuming you have a 'body' variable defined elsewhere
response = platform.post('/restapi/v1.0/account/~/extension/~/sms', body)
data=json.loads(response.text())
print("Request successful.",data)
# Check response status for success
api_response_status = response.json().messageStatus
if api_response_status == "Received" or "Queued":
print('SMS sent successfully!',api_response_status)
else:
print(f'Failed to send SMS. Status: {response.json().messageStatus}')


except Exception as e:
print(f"Error occurred while processing token {e}")
got this error:Error occurred while processing token The requested feature is not available
then tried from api reference ui
got this error
{ "errorCode": "FeatureNotAvailable", "message": "The requested feature is not available", "errors": [ { "errorCode": "MSG-242", "message": "The requested feature is not available" } ] }
looked though few post here in many mention to check account type
/restapi/v1.0/account/accountId/phone-number:
{
                 
"uri":"https://platform.devtest.ringcentral.com/restapi/v1.0/account/338914004/phone-number/373220004"
"id":373220004
"phoneNumber":"+1929415xxxx"
"paymentType":"Local"
"location":"New York City, NY"
"type":"VoiceFax"
"usageType":"MainCompanyNumber"
"status":"Normal"
"primary":false
}
authenticationsending sms
1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered

Please read this post and submit a dev support ticket.

1 |3000

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

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys