question

James Peragine avatar image
James Peragine asked Phong Vu answered

Problem with Update Extension Caller ID

I am using CURL in the developer portal and keep getting an error that the phoneNumber is invalid. What a I doing wrong?


Code:

curl --request PUT \
  --url 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/caller-id' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer [[CODE]]' \
  --header 'content-type: application/json' \
  --data '{"byDevice":[{"device":{"id":"803563698037","uri":"https://platform.ringcentral.com/restapi/v1.0/account/179610037/device/803563698037","phoneNumber":"Ext. 101 Other Phone"},"callerId":{"type":"PhoneNumber","phoneInfo":{"id":"2025731036","uri":"https://platform.ringcentral.com/restapi/v1.0/account/179610037/phone-number/2025731036","phoneNumber":"+19703002096"}}}]}'

Error code I get back is

"errorCode":  "CMN-101"
"message":  "Parameter [phoneNumber] value is invalid."
"parameterName":  "phoneNumber"
caller id
1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered

I think the API reference is incorrect. While waiting for the dev team to confirm and make change to the doc, can you try to remove the "uri" and "phoneNumber" key/value pair from the "device" object. I think the "uri" and "phoneNumber" from the "phoneInfo" object can be omitted as well.

Please try and let me know

1 |3000

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