question

kevon-houghton avatar image
kevon-houghton asked ·

Problems sending SMS in Sandbox

Using the code below where the login works, when trying to send an SMS, I get the following exception: Parameter [from] value [**********] is invalid [Cannot find the phone number which belongs to user]

the ******** is my valid phone number.  I assume this is because the phone numbers don't exist in the sandbox?  How do I know what numbers to use in the sandbox?  I've looked in documentation but can't find anyything.

My code:

var sdk = new SDK(appKey, appSecret, apiServer, applicationName, applicationVersion);
sdk.Platform.Login(userName, extension, password, false);

var requestBody = new {
                    text = text,
                    from = new { phoneNumber = fromPhoneNumber },
                    to = new object[] { new { phoneNumber = toPhoneNumber } } };

var jsonString = JsonConvert.SerializeObject(requestBody);
var request = new RingCentral.Http.Request("/restapi/v1.0/account/~/extension/~/sms", jsonString);

var response = sdk.Platform.Post(request);


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 ·
You login to the Sandbox Online Account Portal ( https://service.devtest.ringcentral.com) to see which numbers are available in your account for use.
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.

kevon-houghton avatar image
kevon-houghton answered ·
I transposed a couple numbers. Fixing that solved my issue.
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.

brian-ladouceur avatar image
brian-ladouceur answered ·
can you provide me test numbers for testing in sandbox mode.?
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.

vb avatar image
vb answered ·
Hi @Brain,

You can use sandbox numbers provided in Developer Portal. For additional numbers, you can add  upto 4 numbers and extensions to your Sandbox Online account here:   https://service.devtest.ringcentral.com/

Here is how you add numbers in the numbers to Sandbox Online account :  Adding a Digital Line (KB 3136) 

Feel free to reach us out at devsupport@ringcentral.com for additional support.
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 ·

Whenever an application is created in Sandbox, you can get the phone number associated with the app in the developer portal. You can add additional numbers and extension

If you still have problem engage Dev support team at devsupport@ringcentral.com

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.