The Tencent Cloud IM Server SDK for Java enables Java developers to easily work with Tencent Cloud IM.
- Java 8 or later
- Maven
Add the Maven dependency:
<dependency>
<groupId>io.github.doocs</groupId>
<artifactId>im-server-sdk-java</artifactId>
<version>0.2.5</version>
</dependency>
Here is a quick teaser of an application using IM SDK in Java:
// sdk appId
long appId = 1400554812;
// admin userId
String identifier = "test";
// application key
String key = "60c6c5925f3ae52c7325ac5a8ec78e44c056d1dd84d54e12ffa39911267a2a70";
// create ImClient instance
ImClient client = ImClient.getInstance(appId, identifier, key);
// import account
AccountImportRequest request = new AccountImportRequest("doocs");
request.setFaceUrl("https://avatars.githubusercontent.com/u/43716716?s=200&v=4");
request.setNick("Doocs Community");
try {
AccountImportResult result = client.account.accountImport(request);
// handle result
} catch (IOException e) {
// handle exception
}
Contributions are always welcomed! Please refer to CONTRIBUTING for detailed guidelines.
Apache-2.0 License.