Stefano_Marciani | 2020-07-07 21:39:06 UTC | #1
Hi, I'm trying to update phone by using Platform API, but when I send my request i receive an error 400: { "message": "A web rtc phone has already been assigned to this user.", "code": "bad.request", "status": 400, "details": [ { "errorCode": "ONLYONEWEBRTCASSIGNMENT_ALLOWED", "fieldName": "webRtcUser" } ] } even if user has both, phone assigned or unassigned i recieve the error. Basically i need to change only the site of the phone. If i remove the WebRtcUser object i receive this message: { "message": "A webRtcUser is required.", "code": "webrtc.user.required", "status": 400 } Could you help me? Regards, Stefano
Jerome.Saint-Marc | 2020-07-08 08:16:59 UTC | #2
Hello,
I am not sure of the API endpoint you are trying to invoke.
But if the purpose is to change/update the site to which a phone is attached to, then, you should use the /api/v2/telephony/providers/edges/phones/{phoneId} endpoint.
You can first get the current details/state of your phone via a GET. https://developer.mypurecloud.com/api/rest/v2/telephonyprovidersedge/#get-api-v2-telephony-providers-edges-phones--phoneId-
Then, in the received structure, update the "site" attribute/structure to point to your new site. You have to specify at least the id and the name of this new site (\$.site.id, \&.site.name). You can also specify its uri via \$.site.selfUri attribute (or just remove it - it is not mandatory for the update). I mean:
{ "id": "myphoneid", "site": { "id": "mynewsite_id", "name": "My new site name" }, "phoneBaseSettings": {
You can then request to update the phone via a PUT, with a body set to the modified structure. https://developer.mypurecloud.com/api/rest/v2/telephonyprovidersedge/#put-api-v2-telephony-providers-edges-phones--phoneId-
Regards,
system | 2020-08-08 08:17:01 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 8221