question

Matt Richmond avatar image
Matt Richmond asked Phong Vu answered

authentication works on sandbox, but not on production

Hi:

I created an app to send SMS, and works fine on the sandbox settings, but doesnt work when i change to production with proper clientid, client secret etc. It returns 'Invalid resource owner credentials' error.

Please help me out. Thanks

{

"error" : "invalid_grant",

"errors" : [ {

"errorCode" : "OAU-140",

"message" : "Invalid resource owner credentials"

} ],

"error_description" : "Invalid resource owner credentials"

}

authentication
1 |1500 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.

Phong Vu avatar image
Phong Vu answered

Please read this article. Summary, you cannot send SMS on behalf of other extensions. The number must belong to the extension who currently login your app, and the number must have the SmsSender feature.

In your case, I guess that you are using the company number from an extension which is not assigned with the SmsSender feature. Check the sample code from the quick start link below to see how to detect SMS feature before using the number.

https://developers.ringcentral.com/guide/messaging/quick-start

1 |1500 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.

Phong Vu avatar image
Phong Vu answered

Clearly you logged in with wrong user credentials. Use the one that you can use to login service.ringcentral.com

1 |1500 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.

Matt Richmond avatar image
Matt Richmond answered

I checked everything and even reset the password, still same error

1 |1500 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.

Matt Richmond avatar image
Matt Richmond answered

ok, i changed the extension from 101 to 100, and passed the authorization, but got another strange error:

{

"errorCode" : "FeatureNotAvailable",

"message" : "The requested feature is not available",

"errors" : [ {

"errorCode" : "MSG-242",

"message" : "The requested feature is not available"

} ]

}

1 |1500 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.

Matt Richmond avatar image
Matt Richmond answered Matt Richmond edited

i managed to get working, but got another question, how can i use other phone numbers that have different extension as from number other than the main number under telus business connect user list to send sms

1 |1500 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.

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