Tencent Cloud IM Server SDK in Java
The Tencent Cloud IM Server SDK for Java enables Java developers to easily work with Tencent Cloud IM.
Requirements
- Java 8 or later
- Maven
Installation and Getting Started
1. Maven Configuration
Add the Maven dependency:
<dependency>
<groupId>io.github.doocs</groupId>
<artifactId>im-server-sdk-java</artifactId>
<version>0.0.3</version>
</dependency>
2. Getting Started
Here is a quick teaser of an application using IM SDK in Java:
public class Main {
public static void main(String[] args) {
// type your sdkAppId here
long appId = 1400554812;
// type your adminUserId here
String identifier = "test";
// type your applicationKey here
String key = "60c6c5925f3ae52c7325ac5a8ec78e44c056d1dd84d54e12ffa39911267a2a70";
// create ImClient instance
IMClient client = IMClient.getInstance(appId, identifier, key);
// import account
AccountImportRequest request = new AccountImportRequest();
request.setFaceUrl("https://avatars.githubusercontent.com/u/43716716?s=200&v=4");
request.setIdentifier("doocs");
request.setNick("Doocs Community");
try {
AccountImportResult result = client.account.accountImport(request);
System.out.println(result);
} catch (IOException e) {
e.printStackTrace();
}
}
}
Authors
Contributing
Contributions are always welcomed! Please refer to CONTRIBUTING for detailed guidelines.
License
Apache-2.0 License.