Back to Blog

Supercharge Your App with Agora’s Chat SDK

In today’s digital-first world, in-app real-time communication is a necessity. Users expect seamless, instant interactions within the apps they use daily. That’s where Agora’s Chat SDK comes in, empowering developers to quickly integrate powerful real-time chat capabilities into their applications across multiple platforms.

Key Features of Agora’s Chat SDK

Supercharge Your App with Agora’s Chat SDK - Key Features

Platform Support

Agora’s Chat SDK supports a wide range of native platforms, including iOS, Android, Web, and Windows, as well as cross-platform frameworks like Unity, Flutter, and React Native. This means you can easily integrate chat functionality into your app, no matter which platform you’re developing for.

Message Types

Create rich, engaging conversations within your app, going beyond simple text-based chat. The Chat SDK supports various message types, including text, image, audio, video, and files.

End-to-End Encryption

Security is paramount when it comes to communication. Agora’s Chat SDK offers end-to-end encryption, ensuring only the intended recipients can read the messages. This provides peace of mind for developers and end-users, knowing their conversations are protected.

Translation

Breaking down language barriers is crucial in today’s global marketplace. The Chat SDK includes built-in translation capabilities supporting a wide range of languages. This allows users from different regions to communicate seamlessly within your app.

Content Moderation

Maintaining a safe and positive environment is essential for any communication platform. Agora’s Chat SDK provides content moderation features, allowing you to set rules for what can be shared in groups and chatrooms. This helps protect your users from unwanted content and ensures a better overall experience.

Getting Started with Agora’s Chat SDK

Setting Up Your Account

To get started with Agora’s Chat SDK, you’ll need an Agora.io account. Once you’ve signed up, navigate to the Project Management page, select the project you want to add Chat to (or create a new one), and enable the Chat extension.

Supercharge Your App with Agora’s Chat SDK - Features

Once enabled, you can click the button to go to Chat. There we can see basic information about our account, including the AppKey, which you'll need to initialize your Chat SDK instance.

Supercharge Your App with Agora’s Chat SDK - Application Information

On this screen, you can see an overview of the available features and your current plan. In this example, we are using the “PRO” plan.

Supercharge Your App with Agora’s Chat SDK - Feature Overview

From here, we can also head to the Operation Management tab on the left. There are options to see user accounts, groups, and chatrooms.

Supercharge Your App with Agora’s Chat SDK - Operation Management

Initializing the SDK

Initializing the Chat SDK in your app is straightforward. Here’s an example of how to do it in an iOS app using Swift:

let options = AgoraChatOptions(appkey: <#Agora Chat Key#>)
if let initErr = AgoraChatClient.shared.initializeSDK(with: options) {
    print("Could not initialize! Reason: \(initErr.errorDescription)")
}

Logging In

Once the SDK is initialized, you can log in to the user’s account:

AgoraChatClient.shared.login(
    withUsername: username, agoraToken: token
) { username, err in
    if let err = err {
        print("Could not log in! Reason: \(err.errorDescription)")
    } else {
        print("Logged in")
    }
}

With the SDK initialized and the user logged in, you can start sending messages. You can send direct messages, create groups, and more. Check out the platform-specific documentation for detailed guides on these features.

Note: The token must be fetched from your token server, for this you can use Agora’s open-source micro-service, available using quick-deploy:

Resources and Support

If you need support using Agora’s Chat SDK, visit console.agora.io and click “Support” at the top of the page.

Try out Agora’s Chat SDK today and take your app’s real-time communication to the next level!

RTE Telehealth 2023
Join us for RTE Telehealth - a virtual webinar where we’ll explore how AI and AR/VR technologies are shaping the future of healthcare delivery.

Try Agora for Free

Sign up and start building! You don’t pay until you scale.
Try for Free
Get Started with Agora thumbnail