最新のベータ版には、コマンドラインでアプリケーション API V2 をサポートするすべての機能が含まれています。次のコマンドを使用して、インストールされているバージョンを確認できます。
nexmo --version
アプリケーションの一覧表示
現在のアプリケーションを一覧表示するには、次を使用します:
nexmo app:list
これにより、アプリケーション ID と名前を示すリストが表示されます。
アプリケーションの詳細を表示する
特定のアプリケーションの詳細を表示するには (APP_ID は既存のアプリケーションのアプリケーション ID です):
nexmo app:show APP_ID
次のようなものが返されます:
[id]61fd1849-280d-4722-8712-1cc59aa12345[name]My Client SDK App[keys.public_key]-----BEGIN PUBLIC KEY-----MII...n9efcS+L...-----END PUBLIC KEY-----[_links.self.href]/v2/applications/61fd1849-280d-4722-8712-1cc59aa12345[voice.webhooks.0.endpoint_type]event_url[voice.webhooks.0.endpoint]https://example.ngrok.io/webhooks/event[voice.webhooks.0.http_method]POST[voice.webhooks.1.endpoint_type]answer_url[voice.webhooks.1.endpoint]https://example.ngrok.io/webhooks/answer[voice.webhooks.1.http_method]GET
または、結果をアプリケーション V2 形式で表示するには、次の手順を実行します。
nexmo as APP_ID --v2
これにより、次のようなものが返されます:
[id]61fd1849-280d-4722-8712-1cc59aa12345[name]My Client SDK App[keys.public_key]-----BEGIN PUBLIC KEY-----MIIB...DAQAB...-----END PUBLIC KEY-----[capabilities.voice.webhooks.event_url.address]https://example.ngrok.io/webhooks/event[capabilities.voice.webhooks.event_url.http_method]POST[capabilities.voice.webhooks.answer_url.address]https://example.ngrok.io/webhooks/answer[capabilities.voice.webhooks.answer_url.http_method]GET[_links.self.href]/v2/applications/61fd1849-280d-4722-8712-1cc59aa12345
nexmo as 43fd399e-0f17-4027-83b9-cc16f4a12345 --v2
これは次のようなものを返します:
[id]43fd399e-0f17-4027-83b9-cc16f4a12345[name]FaceBook Messenger App[keys.public_key]-----BEGIN PUBLIC KEY-----MIIB...AQAB...-----END PUBLIC KEY-----[capabilities.messages.webhooks.inbound_url.address]https://example.ngrok.io/webhooks/inbound[capabilities.messages.webhooks.inbound_url.http_method]POST[capabilities.messages.webhooks.status_url.address]https://example.ngrok.io/webhooks/status[capabilities.messages.webhooks.status_url.http_method]POST[_links.self.href]/v2/applications/43fd399e-0f17-4027-83b9-cc16f4a12345
[id]9a1089f2-3990-4db2-be67-3e7767bd20c9[name]APP_NAME[keys.public_key]-----BEGIN PUBLIC KEY-----MII...EAAQ==-----END PUBLIC KEY-----[capabilities.voice.webhooks.event_url.address]http://example.com/event[capabilities.voice.webhooks.event_url.http_method]POST[capabilities.voice.webhooks.answer_url.address]http://example.com/answer[capabilities.voice.webhooks.answer_url.http_method]GET[capabilities.voice.webhooks.fallback_answer_url.address][capabilities.voice.webhooks.fallback_answer_url.http_method]GET[capabilities.rtc.webhooks.event_url.address]http://example.com/rtcevent[capabilities.rtc.webhooks.event_url.http_method]POST[_links.self.href]/v2/applications/9a1089f2-3990-4db2-be67-3e7767bd20c9To recreate a similar application use the following command:nexmo app:create DELETE ME FOREVER --capabilities=voice,rtc --voice-answer-url=http://example.com --voice-fallback-answer-url= --voice-event-url=http://example.com --rtc-event-url=http://example.com