We have 1500 phone numbers and need to label a good amount of them for tracking purposes, which I've started working on a Python script to accomplish.
_req = platform.get(f'/restapi/v1.0/account/{accountId}/phone-number/') #this will be called once to get numbers _tt = json.loads(_req.text()) _extId = _tt['records'][0]['id'] _pp = platform.get(f'/restapi/v1.0/account/{accountId}/phone-number/{_extId}') _jr = json.loads(_pp.text()) _jr['label'] = "test" _put = platform.put(f'/restapi/v1.0/account/{accountId}/phone-number/{_extId}',_jr)
Which returns
ringcentral.http.api_exception.ApiException: Parameter [phoneNumber] value is invalid.
even though I'm passing the same data and "phoneNumber" just changing the label? Trying "post" instead of "put" returns invalid resource so I know that's not the issue
This is the field we are trying to change via the API
Thanks as always!