question

Brent Benson avatar image
Brent Benson asked ·

Error from SMS API: "Cannot find the phone number which belongs to user"

Hi All,


I was working on send SMS from RingCentral API but encountered the below error:


"Parameter [from] value [**********] is invalid [Cannot find the phone number which belongs to user]"


Here are the step that I followed(referred from https://medium.com/ringcentral-developers/use-curl-to-access-ringcentral-platform-api-d4710fe68fa4):

  • Created sandbox org
  • Got access token
    • curl -i -X POST 'https://platform.devtest.ringcentral.com/restapi/oauth/token' \

      -H 'Accept: application/json' \

      -H 'Content-Type: application/x-www-form-urlencoded' \

      -u '<clientIdFromSandbox>:<clientSecretFromSandbox>' \

      -d 'username=<usernameFromSandbox>&password=<password>&extension=&grant_type=password'

  • Used Access token to send SMS:

  • One doing this, I received Cannot find the phone number which belongs to user error


Please note that I have a person(Super admin) and it has been assigned with the phone number that I am providing in second API call.


Can anyone help me with this to find if I am missing anything?


Regards,

Brent


api 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.

1 Answer

Anirban avatar image
Anirban answered ·

This happens when you use the phone number send the sms different from the phone number you used to generate access token.

First check the phone number and extension number you used to generate the access toke is same you used to send sms in From field

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