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'
- curl -i -X POST 'https://platform.devtest.ringcentral.com/restapi/oauth/token'
Used Access token to send SMS:
curl -i -X POST "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/sms"
-H "Accept: application/json"
-H "Content-Type: application/json"
-H "Authorization: Bearer <access_token>"
-d '{ "to": [{ "phoneNumber": <to_number> }], "from": { "phoneNumber": <usernameFromSandbox> }, "text": "Hello world!" }'
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