vonage users create `
--name='Alice'
✅ Creating User
User ID: USR-00000000-0000-0000-0000-000000000000
Name: Alice
Display Name: Not Set
Image URL: Not Set
Time to Live: Not Set
Channels:
None Set
JavaScript
Create the Users
Each participant in a Conversation is represented by a User object and must be authenticated by the Client SDK. In a production application, you would typically store this user information in a database.
Execute the following commands to create two users, Alice and Bob who will log in to the Vonage Client and participate in the Conversation.
vonage users create ^
--name='Alice'
✅ Creating User
User ID: USR-00000000-0000-0000-0000-000000000000
Name: Alice
Display Name: Not Set
Image URL: Not Set
Time to Live: Not Set
Channels:
None Set
vonage users create \ --name='Alice' ✅ Creating User User ID: USR-00000000-0000-0000-0000-000000000000 Name: Alice Display Name: Not Set Image URL: Not Set Time to Live: Not Set Channels: None Set
vonage users create `
--name='Bob'
✅ Creating User
User ID: USR-00000000-0000-0000-0000-000000000000
Name: Bob
Display Name: Not Set
Image URL: Not Set
Time to Live: Not Set
Channels:
None Set
vonage users create ^
--name='Bob'
✅ Creating User
User ID: USR-00000000-0000-0000-0000-000000000000
Name: Bob
Display Name: Not Set
Image URL: Not Set
Time to Live: Not Set
Channels:
None Set
vonage users create \ --name='Bob' ✅ Creating User User ID: USR-00000000-0000-0000-0000-000000000000 Name: Bob Display Name: Not Set Image URL: Not Set Time to Live: Not Set Channels: None Set
Creating a web-based chat app
Create a web application that enables users to message each other
手順
1
Introduction to this task2
Prerequisites3
Create a Vonage Application4
Create a conversation5
Create the users6
Add users to the conversation7
Generate JWTs8
Install Client SDK9
Create the UI10
Authenticate your Users11
Instantiate VonageClient and create a Session12
Show the message history13
Send a message14
Run your application15
What's next?