Skip to main content
Question

Problem with Update Extension Caller ID

  • November 13, 2019
  • 2 replies
  • 379 views

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"

2 replies

  • Author
  • Known Participant
  • November 13, 2019

error code I get back is


"errorCode":
"CMN-101"
"message":
"Parameter [phoneNumber] value is invalid."
"parameterName":
"phoneNumber"

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • November 13, 2019

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