Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

agora-chat

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agora-chat

Agora chat web sdk

  • 1.2.0
  • npm
  • Socket score

Version published
Weekly downloads
925
decreased by-1.49%
Maintainers
2
Weekly downloads
 
Created
Source

Agora chat sdk Introduction

Agora chat sdk provides complete instant messaging function development capabilities, shields/encapsulate and block its internal complex details, and provides a relatively simple and concise API interface to facilitate third-party applications to quickly integrate instant messaging functions for PC/mobile Web applications


Chat SDK can be integrated in the following way:

  1. Install
npm install agora-chat --save
  1. Import agora-chat
import AC from 'agora-chat';
  1. Initialize the SDK
const conn = new AC.connection({
	appKey: '<your app key>',
});
  1. Login chat server
const options = {
	user: 'userID',
	agoraToken: 'agoraToken',
};
conn.open(options);
  1. Send a message
let option = {
	chatType: 'singleChat',
	type: 'txt',
	to: 'userID',
	msg: 'message content',
};
let msg = AC.message.create(option);
conn.send(msg)
	.then(() => {
		console.log('send private text Success');
	})
	.catch((e) => {
		console.log('Send private text error');
	});

Reference

  • Agora Chat SDK Product Overview
  • Agora Chat SDK API Reference
  • Check our FAQ to see if your issue has been recorded.
  • Dive into Agora SDK Samples to see more tutorials
  • Take a look at Agora Use Case for more complicated real use case
  • Repositories managed by developer communities can be found at Agora Community
  • If you encounter problems during integration, feel free to ask questions in Stack Overflow

FAQs

Package last updated on 21 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc