question

James Peragine avatar image
James Peragine asked ·

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 |1000 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

· Write an 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

Share
1 |1000 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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