Hyphenate Docs

Start Chatting with Hyphenate!

Welcome to the Hyphenate docs portal. Here you'll find comprehensive guides and technical documentation to help you integrate Hyphenate In-App Chat.

Get Started

Server Integration Guide

Component 1: Creating and Mapping User Accounts

Hyphenate User Account

Hyphenate only stores and tracks Hyphenate user account info (Hyphenate ID, password, and APNs display name) for delivery purposes, but does not store user information indefinitely. As a result, you will need to maintain the backend server and database to handle app users' data (e.g. profile data, picture, name, phone number, etc.) then map the Hyphenate user account with the corresponding app user account.

You'll need to use REST API from your server to create Hyphenate user accounts for each of your users and save the Hyphenate username and password so that you can send messages on behalf of those users later.

If you do not have an existing account with the user already, you can simply create these Hyphenate user accounts when a user registers for your app.

If you already have existing users, you'll need to create a script to run through the users in your database and create Hyphenate user accounts (Hyphenate ID, password, nickname) for each of them. You may find Batch User Account API and Create Hyphenate IDs and Bind to Your Existing Users helpful for this.

Read the full details on Hyphenate user account creation and binding

Keep User Accounts in Sync

You will need to keep user accounts in sync with changes in your backend once the Hyphenate user accounts and app user accounts are bound. If a user is deleted from your database or password changed, then we recommend making the corresponding updates to the Hyphenate user accounts for data consistency and security.

Delete associated Hyphenate user account when deleting a user

To ensure ongoing data integrity, use the REST API to delete the Hyphenate user account when deleting a user from the backend of the backend app. Date the Hyphenate user account password if your user's password changes.

To enhance security, we recommend that you update your user's Hyphenate user account password if the user's password on your backend has been updated.

Component 2: Contact Management

Contact management refers to the connections and relationships between users, i.e., a user's contacts or friends. The contact relationship determines the permission of messaging interaction between users (i.e. only receiving the message from user's contacts, chat group, etc). You will need to map the contact relationship with the Hyphenate accounts, so Hyphenate's backend can deliver the message to the corresponding recipients. You can use REST API to manage users' contacts.

We recommend managing the user contacts on your app's backend directly. Choosing to manage the contact management on your's app backend will decouple the data from the Hyphenate backend. However, you can also use the contact management offered by Hyphenate if you're seeking a simpler solution. See section Contact Management.

Typically the process of mapping the contact management of an established user database to the Hyphenate backend is done from the server via the REST APIs. However, the operation could be performed from the client SDKs as well. See iOS Contact Management and Android Contact Management.

Component 3: Use REST APIs to Fetch Message History, Messaging Operations, and Beyond

REST API allows the client (developer's backend or app backend) to perform a comprehensive list of operations. Crucial, but not exclusively to:

  • Fetch message history from the Hyphenate server to store permanently on the developer's server in a timely manner, for instance, to fetch hourly or daily.
  • Chatbot integration. Send a message from the developer's server on behalf of the bot. See Chatbot Integration.
    See REST API Overview for implementation details.

Component 4: Integrate Webhooks for Real Time Data

We have webhooks so you can receive notifications from the Hyphenate server when a message is sent from one user to another, or when a message is queued for delivery later to an offline user.

Next step: REST API Overview

Updated 2 years ago

Server Integration Guide

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.