Verwalten von Applications mit der Vonage CLI

Mit der Vonage CLI können Sie Ihre Vonage Applications erstellen und verwalten. Um Hilfe zu erhalten, geben Sie ein vonage apps --help sobald die CLI installiert ist. Wie bei den meisten vonage-Befehlen können Sie auch hier die --json und --yaml Flaggen, um dass die Ausgabe in diesen Formaten erfolgt.

Auflistung Ihrer Applications

Standardmäßig wird bei der Ausführung von vonage apps wird derselbe Sub-Befehl ausgeführt wie vonage apps list. Es gibt eine Reihe von Flaggen die Sie übergeben können, um Ihre Suche zu verfeinern:

vonage apps

✅ Loading applications... Done

App ID                                Name               Capabilities
------------------------------------  -----------------  ------------------------------------------------------
00000000-0000-0000-0000-000000000000  Application        None
00000000-0000-0000-0000-000000000000  voice Application  Messages, Voice
00000000-0000-0000-0000-000000000000  All enabled        Messages, Network APIs, RTC, VBC, Verify, Video, Voice
vonage apps

✅ Loading applications... Done

App ID                                Name               Capabilities
------------------------------------  -----------------  ------------------------------------------------------
00000000-0000-0000-0000-000000000000  Application        None
00000000-0000-0000-0000-000000000000  voice Application  Messages, Voice
00000000-0000-0000-0000-000000000000  All enabled        Messages, Network APIs, RTC, VBC, Verify, Video, Voice
vonage apps ✅ Loading applications... Done App ID Name Capabilities ------------------------------------ ------------------ ------------------------------------------------------ 00000000-0000-0000-0000-000000000000 Application None 00000000-0000-0000-0000-000000000000 voice Application Messages, Voice 00000000-0000-0000-0000-000000000000 All enabled Messages, Network APIs, RTC, VBC, Verify, Video, Voice

Anwendungsdetails anzeigen

Die show sub können Sie die Details einer bestimmten Anwendung abrufen. Das Format des Befehls ist vonage apps show <id>, wobei <id> ist die UUID der Anwendung.

Hinweis: Dadurch wird der öffentliche Schlüssel nicht angezeigt. Wenn Sie den öffentlichen Schlüssel sehen möchten, können Sie die Funktion --show-all, --json, oder --yaml Flaggen, wodurch keine Informationen geschwärzt werden.

vonage apps show 00000000-0000-0000-0000-000000000000

✅ Fetching application

Name: All enabled
Application ID: 00000000-0000-0000-0000-000000000000
Improve AI: Off
Private/Public Key: Set

Capabilities:
  VOICE:
    Uses Signed callbacks: On
    Conversation TTL: 41 hours
    Leg Persistence Time: 6 days
    Event URL: [GET] https://example.com/voice/event
    Answer URL: [GET] https://example.com/voice/answer
    Fallback URL: [GET] https://example.com/voice/fallback
  
  MESSAGES:
    Authenticate Inbound Media: On
    Webhook Version: v1
    Status URL: [POST] https://example.com/meetings/status
    Inbound URL: [POST] https://example.com/meetings/inbound
  
  VERIFY:
    Webhook Version: v2
    Status URL: [POST] https://example.com/verify2/status
  
  RTC:
    Event URL: [POST] https://example.com/rtc/event
    Uses Signed callbacks: On
  
  VIDEO:
    Archive Status URL: [POST] https://example.com/video/archive-status
    Archive Status Signature Secret: archive status
    Broadcast Status URL: [POST] https://example.com/video/broadcast-status
    Broadcast Status Signature Secret: broadcast status
    Caption Status URL: [POST] https://example.com/video/caption-status
    Caption Status Signature Secret: caption-status
    Connection Created URL: [POST] https://example.com/video/connected-created
    Connection Created Signature Secret: connection created
    Connection Destroyed URL: [POST] https://example.com/video/connection-destroyed
    Connection Destroyed Signature Secret: connection destroyed
    Render Status URL: [POST] https://example.com/video/render-status
    Render Status Signature Secret: render status
    SIP Call Created URL: [POST] https://example.com/video/sip1
    SIP Call Created Signature Secret: Off
    SIP Call Destroyed URL: [POST] https://example.com/video/sip3
    SIP Call Destroyed Signature Secret: Off
    SIP Call Mute Forced URL: [POST] https://example.com/video/sip4
    SIP Call Mute Forced Signature Secret: Off
    SIP Call Updated URL: [POST] https://example.com/video/sip2
    SIP Call Updated Signature Secret: Off
    Stream Created URL: [POST] https://example.com/video/stream-created
    Stream Created Signature Secret: stream created
    Stream Destroyed URL: [POST] https://example.com/video/stream-destroyed
    Stream Destroyed Signature Secret: stream destroyed
  
    RECORDINGS STORAGE:
      Cloud Storage: On
      Storage Type: AmazonS3
      Credential: manchuck_aws_bucket
      End to End Encryption: On
      Server Side Encryption: On
  
  NETWORK APIS:
    Redirect URL: [GET] https://example.com/gnp/redirect
  
  NB: VBC capabilities is not supported through the command line.
vonage apps show 00000000-0000-0000-0000-000000000000

✅ Fetching application

Name: All enabled
Application ID: 00000000-0000-0000-0000-000000000000
Improve AI: Off
Private/Public Key: Set

Capabilities:
  VOICE:
    Uses Signed callbacks: On
    Conversation TTL: 41 hours
    Leg Persistence Time: 6 days
    Event URL: [GET] https://example.com/voice/event
    Answer URL: [GET] https://example.com/voice/answer
    Fallback URL: [GET] https://example.com/voice/fallback
  
  MESSAGES:
    Authenticate Inbound Media: On
    Webhook Version: v1
    Status URL: [POST] https://example.com/meetings/status
    Inbound URL: [POST] https://example.com/meetings/inbound
  
  VERIFY:
    Webhook Version: v2
    Status URL: [POST] https://example.com/verify2/status
  
  RTC:
    Event URL: [POST] https://example.com/rtc/event
    Uses Signed callbacks: On
  
  VIDEO:
    Archive Status URL: [POST] https://example.com/video/archive-status
    Archive Status Signature Secret: archive status
    Broadcast Status URL: [POST] https://example.com/video/broadcast-status
    Broadcast Status Signature Secret: broadcast status
    Caption Status URL: [POST] https://example.com/video/caption-status
    Caption Status Signature Secret: caption-status
    Connection Created URL: [POST] https://example.com/video/connected-created
    Connection Created Signature Secret: connection created
    Connection Destroyed URL: [POST] https://example.com/video/connection-destroyed
    Connection Destroyed Signature Secret: connection destroyed
    Render Status URL: [POST] https://example.com/video/render-status
    Render Status Signature Secret: render status
    SIP Call Created URL: [POST] https://example.com/video/sip1
    SIP Call Created Signature Secret: Off
    SIP Call Destroyed URL: [POST] https://example.com/video/sip3
    SIP Call Destroyed Signature Secret: Off
    SIP Call Mute Forced URL: [POST] https://example.com/video/sip4
    SIP Call Mute Forced Signature Secret: Off
    SIP Call Updated URL: [POST] https://example.com/video/sip2
    SIP Call Updated Signature Secret: Off
    Stream Created URL: [POST] https://example.com/video/stream-created
    Stream Created Signature Secret: stream created
    Stream Destroyed URL: [POST] https://example.com/video/stream-destroyed
    Stream Destroyed Signature Secret: stream destroyed
  
    RECORDINGS STORAGE:
      Cloud Storage: On
      Storage Type: AmazonS3
      Credential: manchuck_aws_bucket
      End to End Encryption: On
      Server Side Encryption: On
  
  NETWORK APIS:
    Redirect URL: [GET] https://example.com/gnp/redirect
  
  NB: VBC capabilities is not supported through the command line.
vonage apps show 00000000-0000-0000-0000-000000000000 ✅ Fetching application Name: All enabled Application ID: 00000000-0000-0000-0000-000000000000 Improve AI: Off Private/Public Key: Set Capabilities: VOICE: Uses Signed callbacks: On Conversation TTL: 41 hours Leg Persistence Time: 6 days Event URL: [GET] https://example.com/voice/event Answer URL: [GET] https://example.com/voice/answer Fallback URL: [GET] https://example.com/voice/fallback MESSAGES: Authenticate Inbound Media: On Webhook Version: v1 Status URL: [POST] https://example.com/meetings/status Inbound URL: [POST] https://example.com/meetings/inbound VERIFY: Webhook Version: v2 Status URL: [POST] https://example.com/verify2/status RTC: Event URL: [POST] https://example.com/rtc/event Uses Signed callbacks: On VIDEO: Archive Status URL: [POST] https://example.com/video/archive-status Archive Status Signature Secret: archive status Broadcast Status URL: [POST] https://example.com/video/broadcast-status Broadcast Status Signature Secret: broadcast status Caption Status URL: [POST] https://example.com/video/caption-status Caption Status Signature Secret: caption-status Connection Created URL: [POST] https://example.com/video/connected-created Connection Created Signature Secret: connection created Connection Destroyed URL: [POST] https://example.com/video/connection-destroyed Connection Destroyed Signature Secret: connection destroyed Render Status URL: [POST] https://example.com/video/render-status Render Status Signature Secret: render status SIP Call Created URL: [POST] https://example.com/video/sip1 SIP Call Created Signature Secret: Off SIP Call Destroyed URL: [POST] https://example.com/video/sip3 SIP Call Destroyed Signature Secret: Off SIP Call Mute Forced URL: [POST] https://example.com/video/sip4 SIP Call Mute Forced Signature Secret: Off SIP Call Updated URL: [POST] https://example.com/video/sip2 SIP Call Updated Signature Secret: Off Stream Created URL: [POST] https://example.com/video/stream-created Stream Created Signature Secret: stream created Stream Destroyed URL: [POST] https://example.com/video/stream-destroyed Stream Destroyed Signature Secret: stream destroyed RECORDINGS STORAGE: Cloud Storage: On Storage Type: AmazonS3 Credential: manchuck_aws_bucket End to End Encryption: On Server Side Encryption: On NETWORK APIS: Redirect URL: [GET] https://example.com/gnp/redirect NB: VBC capabilities is not supported through the command line.

Erstellen einer Applikation

Die vonage apps create <name> können Sie eine Anwendung erstellen. Sie müssen einen Anwendungsnamen angeben, da die Befehlszeilenschnittstelle keinen Namen für Sie generiert.

Der Befehl hat die folgenden Flags:

Hinweis: Wenn Sie keinen eigenen Schlüssel zur Verfügung stellen, wird Vonage einen für Sie erstellen. Wenn Sie jedoch den Schlüssel bei der Erstellung der Anwendung nicht speichern, können Sie nicht mehr darauf zugreifen. Sie müssen den Schlüssel neu generieren, wenn Sie ihn verlieren.

vonage apps create 'Your application'

✅ Creating Application
Saving private key ... Done!
Application created

Name: Your application
Application ID: 00000000-0000-0000-0000-000000000000
Improve AI: Off
Private/Public Key: Set

Capabilities:
  None Enabled
vonage apps create 'Your application'

✅ Creating Application
Saving private key ... Done!
Application created

Name: Your application
Application ID: 00000000-0000-0000-0000-000000000000
Improve AI: Off
Private/Public Key: Set

Capabilities:
  None Enabled
vonage apps create 'Your application' ✅ Creating Application Saving private key ... Done! Application created Name: Your application Application ID: 00000000-0000-0000-0000-000000000000 Improve AI: Off Private/Public Key: Set Capabilities: None Enabled

In früheren Versionen der Befehlszeilenschnittstelle (CLI) konnten Sie auch die Anwendungsfähigkeiten einstellen. Diese Möglichkeit wurde jedoch mit Version 3 der CLI entfernt - die Gründe dafür werden erläutert unter.

Aktualisieren einer Applikation

vonage apps update <id> können Sie den Namen einer bestehenden Anwendung aktualisieren, die Einstellung "Improve AI" ändern oder einen neuen öffentlichen Schlüssel festlegen:

vonage apps update 00000000-0000-0000-0000-000000000000 `
  --name="New Application Name"
  
✅ Fetching Application
✅ Updating Application

Name: New Application Name
Application ID: 00000000-0000-0000-0000-000000000000
Improve AI: Off
Private/Public Key: Set
vonage apps update 00000000-0000-0000-0000-000000000000 ^
  --name="New Application Name"
  
✅ Fetching Application
✅ Updating Application

Name: New Application Name
Application ID: 00000000-0000-0000-0000-000000000000
Improve AI: Off
Private/Public Key: Set
vonage apps update 00000000-0000-0000-0000-000000000000 \ --name="New Application Name" ✅ Fetching Application ✅ Updating Application Name: New Application Name Application ID: 00000000-0000-0000-0000-000000000000 Improve AI: Off Private/Public Key: Set

Löschen einer Applikation

Sie können eine Anwendung mit dem Befehl vonage apps delete <id>, wobei id ist die UUID der Anwendung:

vonage apps delete 00000000-0000-0000-0000-000000000000

✅ Fetching application
Delete application New Name (7d7133ab-de4e-4b7a-8e1e-376670077c71)? [y/n] 
✅ Deleting application
vonage apps delete 00000000-0000-0000-0000-000000000000

✅ Fetching application
Delete application New Name (7d7133ab-de4e-4b7a-8e1e-376670077c71)? [y/n] 
✅ Deleting application
vonage apps delete 00000000-0000-0000-0000-000000000000 ✅ Fetching application Delete application New Name (7d7133ab-de4e-4b7a-8e1e-376670077c71)? [y/n] ✅ Deleting application

Verwaltung der Fähigkeiten einer Applikation

In früheren Versionen der Befehlszeilenschnittstelle mussten Sie alle Werte eingeben, wenn Sie eine Fähigkeit für eine Anwendung ändern wollten. Das bedeutete, dass Sie sich die aktuellen Werte merken mussten, und wenn Sie ein Flag nicht mitgaben oder einen falschen Wert eingab, funktionierte die Fähigkeit nicht wie erwartet. Version 3 der CLI löst dieses Problem mit einem neuen Unterbefehl zur Verwaltung von Anwendungsfunktionen. Das Befehlsformat ist wie folgt wie folgt: vonage apps capabilities <action> <id> <which> [flags].

Verwalten von Numbers für eine Applikation

Mit der Version 3 der Befehlszeilenschnittstelle (CLI) können Sie Numbers für eine Anwendung einfach verwalten. Es gibt zwei Hauptbefehle: vonage apps numbers list <id>, und, vonage apps numbers <link|unlink> <id> <msisdn>. Die Verwendung dieser Befehle stellt sicher dass die Numbers richtig verknüpft werden.

Auflistung der Numbers, die mit einer Applikation verknüpft sind

Um alle Numbers aufzulisten, die mit einer Anwendung verknüpft sind, führen Sie Folgendes aus vonage apps numbers list <id>, wobei id ist die UUID für die Anwendung. Wenn Sie die --fail Flagge, wird dieser Befehl mit dem Code 1 wenn die Anwendung nicht über entweder messages oder voice Fähigkeiten.

Hinweis: Dadurch wird die API kontinuierlich aufgerufen, um alle von Ihnen verknüpften Numbers abzurufen. Dies kann einige Zeit dauern, je nachdem, wie viele Numbers Sie haben.

vonage apps numbers list 00000000-0000-0000-0000-000000000000

✅ Fetching Application
Fetching numbers linked to application Your application [==============] 1/1 100%

There is 1 number linked:

Number       Country             Type       Features       
-----------  ------------------  ---------  ---------------
16127779311  🇺🇸 United States    Mobile     MMS, SMS, VOICE
vonage apps numbers list 00000000-0000-0000-0000-000000000000

✅ Fetching Application
Fetching numbers linked to application Your application [==============] 1/1 100%

There is 1 number linked:

Number       Country             Type       Features       
-----------  ------------------  ---------  ---------------
16127779311  🇺🇸 United States    Mobile     MMS, SMS, VOICE
vonage apps numbers list 00000000-0000-0000-0000-000000000000 ✅ Fetching Application Fetching numbers linked to application Your application [==============] 1/1 100% There is 1 number linked: Number Country Type Features ----------- ------------------ --------- --------------- 16127779311 🇺🇸 United States Mobile MMS, SMS, VOICE

Verknüpfen/Entknüpfen einer Number mit einer Applikation

Numbers können verknüpft werden mit vonage apps <link|unlink> <id> <msisdn>, wobei id ist die UUID für die Anwendung, und msisdn ist die zu verknüpfende oder zu entknüpfende Nummer.

Anmerkung: die Flags --app-id und --private-key werden bei diesem Befehl ignoriert.

vonage apps numbers link 00000000-0000-0000-0000-000000000000 16127779311

✅ Fetching Application
Fetching Owned numbers [===============================================] 1/1 100%

Number linked

Number: 16127779311
Country: 🇺🇸 United States
Type: Toll-free
Features: MMS, SMS, VOICE
Monthly Cost: Not Set
Setup Cost: Not Set
Linked Application ID: 00000000-0000-0000-0000-000000000000
Voice Callback: app
Voice Callback Value: 00000000-0000-0000-0000-000000000000
Voice Status Callback: Not Set
vonage apps numbers link 00000000-0000-0000-0000-000000000000 16127779311

✅ Fetching Application
Fetching Owned numbers [===============================================] 1/1 100%

Number linked

Number: 16127779311
Country: 🇺🇸 United States
Type: Toll-free
Features: MMS, SMS, VOICE
Monthly Cost: Not Set
Setup Cost: Not Set
Linked Application ID: 00000000-0000-0000-0000-000000000000
Voice Callback: app
Voice Callback Value: 00000000-0000-0000-0000-000000000000
Voice Status Callback: Not Set
vonage apps numbers link 00000000-0000-0000-0000-000000000000 16127779311 ✅ Fetching Application Fetching Owned numbers [===============================================] 1/1 100% Number linked Number: 16127779311 Country: 🇺🇸 United States Type: Toll-free Features: MMS, SMS, VOICE Monthly Cost: Not Set Setup Cost: Not Set Linked Application ID: 00000000-0000-0000-0000-000000000000 Voice Callback: app Voice Callback Value: 00000000-0000-0000-0000-000000000000 Voice Status Callback: Not Set

Referenz