Nexmo In-App Voice uses WebRTC and includes all the essentials you need to build a feature rich voice experience.
User Control – Users can control whether their audio stream is muted or unmuted.
Notifications – Users can be notified when they receive a call or when participants are muted.
Group Calls – Configure call settings so users can start a group call by adding participants in real time.
A conversation is a shared core component that Nexmo APIs rely on. Conversations happen over multiple mediums and and can have associated Users through Memberships.
The concept of a user exists in Nexmo APIs, you can associate one with a user in your own application if you choose. A user can have multiple memberships to conversations and can communicate with other users through various different mediums.
Memberships connect users with conversations. Each membership has one conversation and one user however a user can have many memberships to conversations just as conversations can have many members.
Audio streams can be enabled and disabled in a Conversation so that Members can communicate with voice.
Media events will fire in a Conversation when media state changes for a member. This can be when an Audio stream is started or ended.
$ npm install -g nexmo-cli@beta
Setup the CLI to use your Nexmo API Key and API Secret. You can get these from the setting page in the Nexmo Dashboard.
$ nexmo setup api_key api_secret
Create an application named
My first Stitch Application and store the returned private key as
private.key within your current working directory.
$ nexmo app:create "My first Stitch Application" --type=rtc --keyfile=private.key
With a private key you can generate a JWT with the Nexmo CLI:
$ nexmo jwt:generate ./private.key
curl -X "POST" "https://api.nexmo.com/beta/conversations" \ -H "Authorization: Bearer <JWT>"
curl -X "POST" "https://api.nexmo.com/beta/users" \ -H "Authorization: Bearer <JWT>" \ -d name='Ann Example'
curl -X "POST" "https://api.nexmo.com/beta/conversations/<CONVERSATION_ID>/members" \ -H "Authorization: Bearer <JWT>" \ -d action='join' \ -d user_id='<USER_ID>' \ -d channel.type='app'