I want department name in "GetExtension" API
how can I get department in "GetExtension" API
I want department name in "GetExtension" API
how can I get department in "GetExtension" API
Read the extension info using the Get Extension API. If the extension belongs to one or more departments, the response will contain an array or departments. Read each department with the id or using the URI in each attachment object to get details of that department.
async function read_user_info(extensionId) {
try{
var resp = await platform.get(`/restapi/v1.0/account/~/extension/${extensionId}`)
var jsonObj = await resp.json
console.log("===========")
console.log(jsonOb
}catch(e){
console.log(e.message)
}
}
// E.g. response with departments array
...
departments: [
{
uri: 'https://platform.ringcentral.com/restapi/v1.0/account/80964xxxx/extension/6237675xxxx',
id: '6237675xxxx',
extensionNumber: '11603'
},
{
uri: 'https://platform.ringcentral.com/restapi/v1.0/account/80964xxxx/extension/6237675xxxx',
id: '6237675xxxx',
extensionNumber: '12002'
},
...
// Now call the function again to get department's details
read_user_info(6237675xxxx)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.