No, a phone number cannot be provisioned for both EB SMS and HV SMS. I will be either feature if provisioned.
Your account has 2 HV SMS numbers and they are xxx-8335 and xxx-8340. And yes, these 2 numbers are assigned to the extension "8197 - sms admin".
How do you get the error above? Did you authenticate your app with the "SMS admin" user's credentials?
Check what you get if you implement this function in your code
/*
Read phone number(s) that belongs to the authenticated user and detect if a phone number
has the A2P SMS capability
*/
async function read_extension_phone_number_detect_a2psms_feature(){
try {
let endpoint = "/restapi/v1.0/account/~/extension/~/phone-number"
var resp = await platform.get(endpoint)
var jsonObj = await resp.json()
for (var record of jsonObj.records){
for (feature of record.features){
if (feature == "A2PSmsSender"){
// If a user has multiple phone numbers, check and decide which number
// Can use this number to send A2P text message ...
}
}
}
if (jsonObj.records.length == 0)
console.log("This user does not own a phone number!")
else
console.log("None of this user's phone number(s) has A2P SMS capability!")
} catch(e) {
console.log(e.message)
}
}