question

sami-sam8504 avatar image
sami-sam8504 asked Anirban answered

SMS 403 error

I am testing sending a SMS and each time I get a 403 error although I have authorization from the client account. Is it an account limitation or there is something else??!! Thank you!

getting started
1 |3000

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

igor-bebin avatar image
igor-bebin answered
Hi Sami,

Could you please provide request and response? The might be a different reasons of 403 Forbidden response, e.g. SMS feature is not available, ineligible Phone Number, insufficient User/Application permissions, etc. 

Thanks!
1 |3000

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

sami-sam8504 avatar image
sami-sam8504 answered
thank you for your reply,
here is my function it practically send a message through the java rest api the uri are ok and the only important thing here are the phone numbers message.sendSms("myaccount-phone", "to-phone", "this is me if you get this acknowledge");the to-phone is a mobile phonethe response doesn't specify any error message besides 403another thing this is a sandbox accountthank you


1 |3000

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

igor-bebin avatar image
igor-bebin answered
Hi,

403 is HTTP Code. Also you should be provided with response body having additional details like errorCode and appropriate message, e.g.:

HTTP 403
{    "errorCode" : "FeatureNotAvailable",    "message" : "The requested feature is not available",    "errors" : [ {      "errorCode" : "MSG-242",      "message" : "The requested feature is not available"    } ]   }
In RC logs I can see 3 different error codes for your account: 
# MSG-242 //Sending SMS is not available from the number specified.
# MSG-304 //Phone number doesn't belong to extension
# MSG-240 //Specified recipient [${toPhoneNumber}] isn't an US phone number

Please advise if you still have any questions.

Thanks,
1 |3000

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

John Wang avatar image
John Wang Deactivated answered
To get a list of valid SMS numbers, list your phone numbers by calling the 'account/~/extension/~/phone-number' endpoint and then filter by phone numbers with the 'SmsSender' feature.

Here is some documentation on this:

http://ringcentral-api-docs.readthedocs.io/en/latest/messages_sms-and-pager/#listing-valid-sms-sendi...
1 |3000

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

Anirban avatar image
Anirban answered

Until and unless the response code with error message is given here, it's difficult to say about the reason of the 403 error. It may be of many reasons like invalid client, invalid grant_type etc.

You need to provide the error code in the response here

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