question

Bob Thompson avatar image
Bob Thompson asked benjamin-dean commented

304 error after transition to production

I see this issue in another thread and I don't know if I'm supposed to place at the bottom of it or a new thread. I didn't see the issue resolved however. I am having the same issue. I graduated form development to production today. I changed my URLs to the platform.ringcentral.com address. I changed my key & secret codes to production values and immediately received a 304 error. After reading your post on the previous thread, I checked with my RingCentral account and tried changing my credentials to the phone number, extension & password of the operator's extension to no avail. I also tried changing them to my credentials(super admin), again to no avail. I'm at a loss.

Thanks,

bob

errors
1 |3000

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

ak avatar image
ak answered
Hi Bob,

What is the API endpoint which is resulting in the HTTP 304 error code. 
1 |3000

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

Bob Thompson avatar image
Bob Thompson answered
Thanks for the assistance.  The endpoint is: /restapi/v1.0/account/~/extension/~/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.

anton-nikitin avatar image
anton-nikitin answered
Hi Bob,

basing on your post I expect that you have read  https://devcommunity.ringcentral.com/ringcentraldev/topics/how-to-send-sms-from-the-main-company-num...

If you are still getting MSG-304 after making all these steps, please let us know what phone number you use to login and what number you choose to send SMS from.

Thanks,

Anton
1 |3000

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

Bob Thompson avatar image
Bob Thompson answered
Anton,  

Still getting the error, I tried switching back to the development server and works fine.  Back to production and get the error.  I am logging in with number 18778897640 (operator) and sending with number 18883931083.

Thanks,
bob
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
Oh, this is very simple: RingCentral does not currently support sending SMS from toll-free numbers. This limitation is primarily because inability of some carriers to route inbound SMS to toll free numbers.

I suspect that if you try any local company number (if you have one) it will work.

Anton  
1 |3000

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

Bob Thompson avatar image
Bob Thompson answered
OK, I changed my send from number to 16788841809, one of our local numbers.  I am still getting my token logged in as our operator as required (18778897640),  I am still getting a 304 error.  Do I have to change my operator number to a local number as well?
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 benjamin-dean commented
Bob, according to what I can see, 16788841809 is mapped to ext.124 while your operator extension is 113. Even if you are logged as an operator, you cannot send SMS from other users' direct numbers. In your particular scenario, to be able to send from 16788841809 you need:

- either authenticate as ext.124
- or unassign 16788841809 from ext.124 and make it additional company number 

Anton
6 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.

Bob Thompson avatar image Bob Thompson commented ·
Anton,
Sorry for late reply, I was pulled on to another project.  Is it possible for you to contact me about this.  For some reason I just cannot resolve this problem.  I have tried authenticating as extension 124 to no avail and I have removed 6788841809 from extension 124 and still no success.  I must be doing something wrong however it worked like a charm while I was getting my certification.
Thanks,
bob 
0 Likes 0 ·
benjamin-dean avatar image benjamin-dean commented ·
After you removed 6788841809 from extension 124, did you also assign that number as an additional company number as directed?
0 Likes 0 ·
Bob Thompson avatar image Bob Thompson commented ·
Benjamin,I accidentally deleted the 6788841809 phone number so I added a new one to our pool for SMS only use.  The new number is 678-805-0066.  When adding I didn't add to an extension so only other option was to make it the auto-receptionist.  I tried the SMS program and authenticated with this new number, no extension and password and received the desired token.  I tried to send using same number and received the 403 error.
0 Likes 0 ·
benjamin-dean avatar image benjamin-dean commented ·
I can see you have the correct permissions for your application in DPW, and looking in your account I can see you have that number assigned to the Auto-Receptionist, have assigned your extension (124) as the operator for the auto-receptionist. This means if you want to be able to send SMS using this number, you need to obtain an access_token (authenticate) as your user-extension (124).

An example of what the body of the POST request to /restapi/oauth/token is:

username=<ANY_COMPANY_NUMBER>&password=<124_EXTENSION_PASSWORD>&extension=124

The part you were missing is passing the 'extension' parameter.

Try that, and then use the response's access_token to test sending an SMS (making sure to set the "from" number to be 16788050066).

Let me know if this works as expected.
0 Likes 0 ·
Bob Thompson avatar image Bob Thompson commented ·
Finally,

It works now.  Thank you Benjamin for all your help.

Cheers,
Bob
0 Likes 0 ·
Show more comments

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