question

Chandu Yela avatar image
Chandu Yela asked Gurpreet Singh commented

Phone doesn't belong to extension - Production

Hi,

I have recently created app in sandbox , tested for two days and it got approved for production and i tested it using this page https://developers.ringcentral.com/api-reference/SMS/createSMSMessage

and i received the message to the number i specified


But when i tried integrating with our java application , i am getting phone doesn't belong to extension

Please help me out

sms and text messagingextension
1 |3000

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

Phong Vu avatar image
Phong Vu answered NuCare Admin commented

The error message indicates that the from.phoneNumber does not belong to the extension (user) who logged in to run the app. Double check and use the direct number assigned to that user would help.

1 comment
1 |3000

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

NuCare Admin avatar image NuCare Admin commented ·

Hi . Greetings.

I am currently working on sandbox environment, and my phone number is associated to my account. But when I try to test sms api, it returns an error "Phone number doesn't belong to extension"

{ "to" : [{ "phoneNumber" : "+171xxxxxxxx " }], "from" : { "phoneNumber" : "+147xxxxxxxx}" }, "text" : "Test SMS message from Platform server" }


What's wrong?

Please let me know your thoughts.

Thanks.

0 Likes 0 ·
Rahul G avatar image
Rahul G answered

I think this has to do with the correct phone number, you need to ensure to use the phone number in E.164 format and also see if the post is being done as expected. Also, please share your error code what you are facing so that we can understand the issue better and help you with a resolution.

1 |3000

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

NuCare Admin avatar image
NuCare Admin answered

Hi . Greetings.

I am currently working on sandbox environment, and my phone number is associated to my account. But when I try to test sms api, it returns an error "Phone number doesn't belong to extension"

{ "to" : [{ "phoneNumber" : "+171xxxxxxxx " }], "from" : { "phoneNumber" : "+147xxxxxxxx}" }, "text" : "Test SMS message from Platform server" }


What's wrong?

Please let me know your thoughts.

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.

Gurpreet Singh avatar image
Gurpreet Singh answered NuCare Admin edited

Hi @NuCare Admin

I think, this issue may be that you are using your sandbox number in production environment. Please note that both environments are different.

Lets say your sandbox number is 772-XXX-YYYY

For Sandbox environment, you will use

1a. Sandbox URL: https://platform.devtest.ringcentral.com

1b. Sandbox Application credentials

1c. Sandbox User (Lets say extension 101 who owns this number 772-XXX-YYYY)

Now, when you graduate your application to production, you need to migrate to new production environment.

2a. Production URL: https://platform.ringcentral.com

2b. Production Application Credentials

2c. Production User (Let’s say extension 101 who owns new production number 566-AAA-BBBB) -> THIS IS NOT THE SAME SANDBOX NUMBER AS 1c

Looks like you are using 2a and 2b but with 1c (ie with sandbox number)

So to use SMS API’s in production, you need a production account which can be purchased from https://www.ringcentral.com/office/plansandpricing-b.html#mvp

Please note, you need to be on Premium or Ultimate account to be able to use Developer Platform APIs (i.e SMS APIs)

When you use your production user with a production number against production environment, everything will work.

Hope this clarifies, but in case the problem persists, I suggest you to open a direct ticket here: https://developers.ringcentral.com/support/create-case and we can look into your case more closely.

Regards

Gurpreet Singh

PM, Platform Products

1 comment
1 |3000

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

NuCare Admin avatar image NuCare Admin commented ·

Thanks for your reply.

You said "I think, this issue may be that you are using your sandbox number in the Production environment. Please note that both environments are different. "


But I am working on a sandbox environment, and as I said, my phone number is connected to the sandbox account.

Please see this screenshot.

https://prnt.sc/U-WhTw7UqO-7


I used phone number of sandbox for SMS API, but it's not working.

I think you're confused now.

Please help me help me.

Thanks.

0 Likes 0 ·
NuCare Admin avatar image
NuCare Admin answered Gurpreet Singh commented

Thanks for your reply.

You said "I think, this issue may be that you are using your sandbox number in the Production environment. Please note that both environments are different. "


But I am working on a sandbox environment, and as I said, my phone number is connected to the sandbox account.

Please see this screenshot.

https://prnt.sc/U-WhTw7UqO-7

I used phone number of sandbox for SMS API, but it's not working.

I think you're confused now.

Please help me help me.

Thanks.

1 comment
1 |3000

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

Gurpreet Singh avatar image Gurpreet Singh commented ·

Ok I understand that now. I thought this comment is to the main issue created in this ticket by Chandu. But your issue is just with sandbox environment.

This message will come if the "from number" used doesn't belong to the user who's logged in and trying to send.

You can go to https://service.devtest.ringcentral.com/ which is Sandbox version of onfiguration portal to see the users and numbers assigned to make sure you are using the right authentication and right number.

As we don't have a lot of information on your account in this public forum, I would suggest you to open a support ticket in case the problem persists.

Also, you can read: https://medium.com/ringcentral-developers/ringcentral-sms-from-phone-number-fd34fc382181

Thanks.


0 Likes 0 ·

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