Getting a list of dial-in numbers
RingCentral Video REST API and Client SDKs are in beta
The RingCentral Video REST API and Client SDKs are currently in beta. Developers should be aware of the following:
- Their feature sets are not reflective of the full scope currently planned.
- Backwards compatibility is not guaranteed from one release to the next during the beta period. Changes can be introduced at any time that may impact your applications with little notice.
When composing an invite to a meeting, it is often important to provide participants with dial-in information if they do not have immediate access to a computer. RingCentral provides dial-in information for countries around the world. These phone numbers do not change often, but if they do, this API will ensure you are always providing correct and current information.
const RC = require('@ringcentral/sdk').SDK
require('dotenv').config();
var rcsdk = new RC({
'server': process.env.RC_SERVER_URL,
'clientId': process.env.RC_APP_CLIENT_ID,
'clientSecret': process.env.RC_APP_CLIENT_SECRET
});
var platform = rcsdk.platform();
platform.login({ 'jwt': process.env.RC_USER_JWT })
platform.on(platform.events.loginSuccess, () => {
get_user_conferencing_info()
})
async function get_user_conferencing_info() {
try {
var resp = await platform.get('/restapi/v1.0/account/~/extension/~/conferencing')
var jsonObj = await resp.json()
console.log( jsonObj )
} catch (e) {
console.log(e.message)
}
}
When run, the sample code above should return something that looks like the following. Your actual result may contain different numbers and is likely to be much larger:
{
phoneNumbers: [
{
phoneNumber: '+16504191505',
country: [Object],
default: true,
location: 'San Mateo, CA'
},
{ phoneNumber: '+18885110509', country: [Object], default: false },
{
phoneNumber: '+541159842371',
country: [Object],
default: false,
location: 'Buenos Aires'
},
{
phoneNumber: '+61862450610',
country: [Object],
default: false,
location: 'Perth'
},
{
phoneNumber: '+61283104136',
country: [Object],
default: false,
location: 'Sydney'
}
]
}