Update an existing application
This code snippet shows how to update an existing application using the Meetings API.
See the API Reference for more information.
Example Request
Where needed, replace the following variables in the sample code with your own values:
| Key | Description |
|---|---|
JWT | Used to authenticate your request. See |
VONAGE_APPLICATION_ID | The Vonage Application ID. |
VONAGE_APPLICATION_PRIVATE_KEY_PATH | Private key path. |
THEME_ID | The theme UUID. |
Write the code
Add the following to update-application.sh:
Copy
curl -X PATCH https://api-eu.vonage.com/meetings/applications \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{
"update_details": {
"default_theme_id": "'$THEME_ID'"
}
}'Run your code
Save this file to your machine and run it:
sh update-application.sh
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 update-application.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 update-application.rb:
Copy
client.meetings.applications.update(default_theme_id: THEME_ID)Run your code
Save this file to your machine and run it:
ruby update-application.rb
Example Response
Copy
{
"application_id": "921a6f5b-1f94-49f4-8107-26f0c75fc6e7",
"account_id": "123ab4cd",
"default_theme_id": "e86a7335-35fe-45e1-b961-5777d4748022"
}