JavaScript
Criar uma conversa
Crie o Conversa que os usuários utilizarão para se comunicarem entre si. Substitua o ID do aplicativo da Vonage no comando abaixo:
Copiar
vonage conversations create `
--name='your_conversation'
✅ Fetching conversation
Name: your_conversation
Conversation ID: CON-00000000-0000-0000-0000-000000000000
Display Name: Not Set
Image URL: Not Set
State: ACTIVE
Time to Leave: Not Set
Created at: 08/29/1997, 02:14:00 AM
Updated at: Not Set
Destroyed at: Not Set
Sequence: 0
Media State:
Earmuffed: ❌ No
Muted: ❌ No
Playing Stream: ❌ No
Recording: ❌ No
Transcribing: ❌ No
Text To Speech: ❌ No
Copiar
vonage conversations create ^
--name='your_conversation'
✅ Fetching conversation
Name: your_conversation
Conversation ID: CON-00000000-0000-0000-0000-000000000000
Display Name: Not Set
Image URL: Not Set
State: ACTIVE
Time to Leave: Not Set
Created at: 08/29/1997, 02:14:00 AM
Updated at: Not Set
Destroyed at: Not Set
Sequence: 0
Media State:
Earmuffed: ❌ No
Muted: ❌ No
Playing Stream: ❌ No
Recording: ❌ No
Transcribing: ❌ No
Text To Speech: ❌ No
vonage conversations create \
--name='your_conversation'
✅ Fetching conversation
Name: your_conversation
Conversation ID: CON-00000000-0000-0000-0000-000000000000
Display Name: Not Set
Image URL: Not Set
State: ACTIVE
Time to Leave: Not Set
Created at: 08/29/1997, 02:14:00 AM
Updated at: Not Set
Destroyed at: Not Set
Sequence: 0
Media State:
Earmuffed: ❌ No
Muted: ❌ No
Playing Stream: ❌ No
Recording: ❌ No
Transcribing: ❌ No
Text To Speech: ❌ No
Anote esse ID de conversa recém-gerado (CON-...). Você vai usá-lo mais tarde para adicionar Usuários para o Conversa como Membros.
Criação de um aplicativo de bate-papo na web
Crie um aplicativo web que permita que os usuários troquem mensagens entre si
Etapas
1
Introdução a esta tarefa2
Prerequisites3
Criar uma aplicação da Vonage4
Iniciar uma conversa5
Criar os usuários6
Adicionar usuários à conversa7
Gerar JWTs8
Instalar o Client SDK9
Criar a interface do usuário10
Autentique seus usuários11
Instancie o VonageClient e crie uma sessão12
Mostrar o histórico de mensagens13
Enviar uma mensagem14
Execute seu aplicativo15
E agora?