Ein Thema erstellen

Dieses Codeschnipsel zeigt, wie man ein Thema mit der Meetings API erstellt.

Siehe die API-Referenz für weitere Informationen.

Beispiel-Anfrage

Ersetzen Sie bei Bedarf die folgenden Variablen im Beispielcode durch Ihre eigenen Werte:

SchlüsselBeschreibung
JWT

Used to authenticate your request. See Authentication for more information, including how to generate a JWT.

MAIN_COLOR

The main color that will be used for the meeting room.

BRAND_TEXT

The text that will appear on the meeting homepage, in the case that there is no brand image.

VONAGE_APPLICATION_ID

The Vonage Application ID.

VONAGE_APPLICATION_PRIVATE_KEY_PATH

Private key path.

Schreiben Sie den Code

Fügen Sie Folgendes zu create-theme.sh hinzu:

curl -X POST https://api-eu.vonage.com/meetings/themes \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "main_color": "'$MAIN_COLOR'",
    "brand_text": "'$BRAND_TEXT'"
   }'

Vollständige Quelle anzeigen

Führen Sie Ihren Code aus

Speichern Sie diese Datei auf Ihrem Rechner und führen Sie sie aus:

sh create-theme.sh

Beispiel Antwort

Ihr Thema wurde erstellt.

{
    "theme_id": "d2ea5d08-43fa-4aeb-9855-dd87d72cb49f",
    "theme_name": "My custom theme",
    "domain": "VCP",
    "account_id": "123ab1ab",
    "application_id": "e3ad0a31-5043-49c7-9c7c-db42ec77823b",
    "main_color": "#12f64e",
    "short_company_url": null,
    "brand_text": "My custom brand",
    "brand_image_colored": null,
    "brand_image_white": null,
    "branded_favicon": null,
    "white_label": false,
    "brand_image_white_url": null,
    "brand_image_colored_url": null,
    "branded_favicon_url": null
}