Skip to main content

Hello,

I have multiple phone numbers in inventory. I want to be able to assign a phone number to an extension I created.


I tried this PATCH command, but it keeps saying the extensionID number is not found: https://developers.ringcentral.com/api-reference/Phone-Numbers/assignPhoneNumberV2


I even tried to do a get of the extension number I want to use, using this GET commad: https://developers.ringcentral.com/api-reference/Phone-Numbers/listExtensionPhoneNumbers


But it still can't find the extension number, it can only show me the results of all the extensions I have in my ringcentral account if I uses the tilde "~"


Is it possible to assign phone numbers to an user's extension? I want to be able to assign a phone number to an extension I created, and have that number be the primary fax and fax only number type.

Where did you get the extension id and make sure that it's valid.

Show me the code how you call the PATCH method to assign a number.


Is the extension number itself the extensionID? For example, when I GET info for an account, this is the response:


{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults": 1,
"startIndex": 1,
"itemsPerPage": 100,
"Resources": [
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": "63548308004",
"meta": {
"resourceType": "User",
"created": "2023-11-15T19:17:30.342Z",
"lastModified": "2023-11-15T19:17:30.342Z",
"location": "https://platform.ringcentral.com/scim/v2/Users/63548308004"
},
"userName": "test.user15@wellthy.com",
"name": {
"formatted": "Test User15",
"familyName": "User15",
"givenName": "Test"
},
"active": true,
"emails": [
{
"value": "test.user15@wellthy.com",
"type": "work"
}
],
"phoneNumbers": [
{
"value": "326",
"type": "other"
}
]
}
]
}

So is "326" the extenstion ID? Because when I try to do a get extension phone number list, it gives a 404 when I enter extensionID as 326:


curl --request GET 
--url 'https://platform.ringcentral.com/restapi/v1.0/account/~/extension/326/phone-number?page=1&perPage=100'


{
"errorCode": "CMN-102",
"message": "Resource for parameter [extensionId] is not found",
"errors": [
{
"errorCode": "CMN-102",
"message": "Resource for parameter [extensionId] is not found",
"parameterName": "extensionId"
}
],
"parameterName": "extensionId"
}

I also want to make sure that I am not changing the company number for our entire account, just the direct number for the user using the extension.


EDIT: I found the issue, I needed to use the "id" not the extension number. I am able to add a phone line now!

The only other thing I have to figure out is if there is an API to make the phone number type fax only,


1700083373393.png


And also if there is an API that can make that primary number as the caller ID for fax number in user's profile

1700083475365.png


Reply