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)
Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.
Download RingCentral Phone for Desktop:
Tip: switch to the "sandbox mode" before logging in the app:
6 People are following this question.