I have tried to delete a phone from a device:
DELETE https://platform.devtest.ringcentral.com/restapi/v2/accounts/accountId/devices/deviceId
but I got the error:
"message": "The line can not be removed from the unassigned device.",
"errorCode": "DEV-353"
What does it mean? What is wrong here?
Thanks
But now I have another issue.I want to assign this phone number to an other extension with:
Phone Numbers - Assign Phone Number
But with this request
curl --request PATCH \
--url 'https://platform.devtest.ringcentral.com/restapi/v2/accounts/~/phone-numbers/400408004' \
--data '{"usageType":"PhoneLine","extension":{"id":"896916005"},"type":"VoiceFax"}'
I got the follwing error:
{
"errors": [
{
"errorCode": "CMN-101",
"message": "Parameter [type] value is invalid",
"parameterName": "type"
}
]
}
I tried also other types but every time the same error
{ "errors": [ { "errorCode": "CMN-101", "message": "Parameter [type] Wert ist ungültig.", "parameterName": "type" } ] }
Don't set the type parameter. OR if you set it, it must be the same as the type of that number. You can read the number info using this API.
Note: This does not support PhoneLine (Digital Line). Only CompanyNumber and DirectNumber
Dear Phong,
After successfully executing the step to remove the phone line, the phone number has been returned to the inventory phone number list, and the UsageType has been changed to 'CompanyNumber'.
DELETE https://platform.devtest.ringcentral.com/restapi/v2/accounts/~/devices/<Device ID>
accept: application/json
content-type: application/json
authorization: Bearer <ACCESS TOKEN>
Request:
{"keepAssetsInInventory":true}
Subsequently, I attempted to reassign the phone number to the extension, but encountered an error. Here are the details:
PATCH https://platform.devtest.ringcentral.com/restapi/v2/accounts/~/phone-numbers/400408004
accept: application/json
content-type: application/json
authorization: Bearer <ACCESS TOKEN>
Request 1:
{"usageType":"DirectNumber","extension":{"id":"899541005"}}
Response 1:
{
"errors": [
{
"errorCode": "CMN-203",
"message": "Internal Server Error"
}
]
}
Request 2:
{"usageType":"CompanyNumber","extension":{"id":"899541005"}}
Response 2:
{
"errors": [
{
"errorCode": "CMN-101",
"message": "Parameter [extension] value is invalid.",
"parameterName": "extension"
}
]
}
More information with phonenumber:
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/phone-number/400408004",
"id": 400408004,
"phoneNumber": "+19492348573",
"paymentType": "Local",
"location": "Laguna Beach, CA",
"type": "VoiceFax",
"usageType": "CompanyNumber",
"status": "Normal",
"primary": false
}
Extension information:
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/899541005",
"id": 899541005,
"extensionNumber": "109",
"contact": {
"firstName": "VNTeam-109",
"lastName": "Team",
"email": "lecongtru.mi@gmail.com",
"emailAsLoginName": false,
"pronouncedName": {
"type": "Default",
"text": "VNTeam-109 Team"
}
},
"name": "VNTeam-109 Team",
"type": "User",
"status": "Enabled",
...
}
Best Regards,
Le Cong Tru
This is your sandbox account and you have max 4 numbers. All numbers are associated with a device so they are digital line (phone line).
I don't see any phone line under this account are unassigned or in the inventory!
If you want to play with the assign phone number API in this account, you have to login the account service web, open the device and select the "Remove Line" option to detach the number from a device. Choose the option to keep the number in the inventory then you can assign that number to an extension.
Dear Phong,
I released another phone number to inventory.
And attempted to reassign that phone number again:
Request:
PATCH https://platform.devtest.ringcentral.com/restapi/v2/accounts/~/phone-numbers/375900005
accept: application/json
content-type: application/json
authorization: Bearer <ACCESS TOKEN>
{"usageType":"DirectNumber","extension":{"id":"899541005"}}
Response:
The RCRequestId of response in case you need:
RCRequestId: 8b9c30fa-f78d-11ee-9b34-005056bb9d9e
Best Regards,
Le Cong Tru
Everything looks correct now. So the problem could be that this is a new (beta) API and it might not be supported in the sandbox environment.
Unfortunately, I cannot quickly test on my sandbox account to verify the reason. But I am still so sure that it is the cause. And I can confirm that this works on production environment.
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder