Nexmo In-App Messaging enables you to build conversation features where communication can take place across multiple platforms.
The context of the conversations is maintained though each communication event taking place within a conversation, no matter the medium.
In-App Messaging is in developer preview
Currently In-App Messaging offers basic IP messaging with the following features:
- Conversation creation and management
- Sending and receiving text
- Member invite management
- Cache support
- Typing indicators
- Message sent, delivered and read receipts
- Image support
- Push notifications
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.
$ 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 Conversation Application and store the returned private key as
private.key within your current working directory.
$ nexmo app:create "My first Conversation 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'