question

travis-carona1490 avatar image
travis-carona1490 asked Suyash Joshi commented

Send SMS - Error MSG-304

I have my app working fine in Sandbox, but in production when trying to send a text, i recieve the following response:


body=>"{\r\n

\"errorCode\" : \"FeatureNotAvailable\",\r\n

\"message\" : \"Phone number doesn't belong to extension\",\r\n

\"errors\" : [ {\r\n

\"errorCode\" : \"MSG-304\",\r\n

\"message\" : \"Phone number doesn't belong to extension\"\r\n

} ]\r\n}", :url=>#<URI::HTTPS:0x007ffb5c0b65d0 URL:https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/sms>;,


I am trying to text a users cell phone number. We receive txts on our cells fine in sandbox mode

sms and text messagingerrors
1 |3000

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

anton-nikitin avatar image
anton-nikitin answered NuCare Admin commented
If you are logged in to the app in production as this account user, then yes.
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 @Anton Nikitin. 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 ·
NuCare Admin avatar image
NuCare Admin answered Suyash Joshi commented

Hi @Anton Nikitin. 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.

3 comments
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 ·

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 Like 1 ·
NuCare Admin avatar image NuCare Admin 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.

0 Likes 0 ·
Suyash Joshi avatar image Suyash Joshi ♦ NuCare Admin commented ·

Hi @NuCare Admin can you please open a support ticket - https://developers.ringcentral.com/support/create-case and provide your App Client ID in there so we can closely look at it ?

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