List numbers that can be used to dial into a meeting
This code snippet shows how to list all dial numbers using the Meetings API.
See the API Reference for more information.
Example Request
Write the code
Add the following to list-dial-in-numbers.sh:
Copy
curl -X GET https://api-eu.vonage.com/meetings/dial-in-numbersRun your code
Save this file to your machine and run it:
sh list-dial-in-numbers.sh
Prerequisites
Copy
npm install @vonage/server-sdkCreate a file named request.js and add the following code:
Copy
const { Auth } = require('@vonage/auth');
const { Meetings } = require('@vonage/meetings');
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const meetingsClient = new Meetings(credentials);Write the code
Add the following to request.js:
Copy
meetingsClient.getDialInNumbers(SESSION_ID)
.then((numbers) => console.log(numbers))
.catch((error) => console.error(error));Run your code
Save this file to your machine and run it:
node request.js
Prerequisites
Copy
pip install vonageCreate a file named request.py and add the following code:
Copy
import vonage
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_PRIVATE_KEY,Run your code
Save this file to your machine and run it:
python request.py
Prerequisites
Copy
gem install vonageCreate a file named list-dial-in-numbers.rb and add the following code:
Copy
client = Vonage::Client.new(
application_id: VONAGE_APPLICATION_ID,
private_key: File.read(VONAGE_APPLICATION_PRIVATE_KEY_PATH)
)Write the code
Add the following to list-dial-in-numbers.rb:
Copy
dial_in_numbers = client.meetings.dial_in_numbers.listRun your code
Save this file to your machine and run it:
ruby list-dial-in-numbers.rb
Example Response
Copy
[
{
"number": 17323338801,
"locale": "en-US",
"display_name": "United States"
}
]