1.3.1 • Published 7 months ago

agora-chat v1.3.1

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

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',
	accessToken: 'accessToken',
};
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

Related resources

  • 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
1.3.1

7 months ago

1.3.0

7 months ago

1.2.2-beta4

11 months ago

1.2.2-3

1 year ago

1.2.2-2

1 year ago

1.2.2-1

1 year ago

1.2.1

1 year ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago