I created an app to send SMS, it's already in Production. I'm using the Operator extension, in my case it's 101, to login to API. I want to use my main company number to send the messages, but when I try to do so I get the error "Phone number doesn't belong to extension".
I checked that the main company number is available to the operator extension by calling 'https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/extension/[myExtensionId]/phone-number', and it shows up, I get the following (note the comments I added):
{
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/extension/[myExtensionId]/phone-number?page=1&perPage=100',
"records": [
{
"features": [
"CallerId",
"SmsSender",
"MmsSender"
],
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/phone-number/xxxxxx",
"id": xxxxxxx,
"phoneNumber": "+1xxxxxx7485", # This is the direct number of extension 101.
"paymentType": "Local",
"type": "VoiceFax",
"usageType": "DirectNumber",
"status": "Normal",
"country": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/dictionary/country/1",
"id": "1",
"name": "United States"
},
"primary": true
},
{
"features": [
"CallerId"
],
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/phone-number/xxxxxxx",
"id": xxxxxxx,
"phoneNumber": "+1xxxxx3430", # This is the Main Fax Company number
"paymentType": "Local",
"location": "xxxxxxx, TX",
"type": "FaxOnly",
"usageType": "CompanyFaxNumber",
"status": "Normal",
"country": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/dictionary/country/1",
"id": "1",
"name": "United States"
},
"primary": false
},
{
"features": [
"CallerId"
],
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/phone-number/xxxxxx",
"id": xxxxx,
"phoneNumber": "+1xxxxx2500", # This is the Main Company number. THIS IS THE NUMBER I WANT TO USE
"paymentType": "Local",
"location": "xxxxxx, TX",
"type": "VoiceFax",
"usageType": "MainCompanyNumber",
"status": "PortedIn",
"country": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/dictionary/country/1",
"id": "1",
"name": "United States"
},
"primary": false
}
],
"paging": {
"page": 1,
"totalPages": 1,
"perPage": 100,
"totalElements": 3,
"pageStart": 0,
"pageEnd": 2
},
"navigation": {
"firstPage": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/extension/[myAccountId]/phone-number?page=1&perPage=100"
},
"lastPage": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/extension/[myAccountId]/phone-number?page=1&perPage=100"
}
}
}