Last updated: 2019-12-30 10:33:32PDF
Login Authentication Overview
Instant Messaging (IM) evolved from the QQ instant messaging system. We extracted QQ’s common modules and integrated them to build the integration-friendly IM SDK and backend service.
The IM SDK can be viewed as QQ without the user interface. Integrating the IM SDK into your app is similar to integrating the QQ kernel.
You must log in to QQ before you can use it for messaging. While you log in to QQ with your QQ ID and password, you must log in to the IM SDK with the specified username (
UserID) and password (
- UserID: Formerly known as Identifier, this is the username used by users to log in to IM. It is actually the user ID in your app.
For example, if a user in your app has the ID of 27149, you can use 27149 as UserID for logging in to IM.
- UserSig: This is the password with which the user logs in to IM. It is the data generated after App Sever use the key to encrypt info such as UserID.
App Login Process
We recommend that apps log in to IM as follows:
- The IM backend completely trusts UserSig. To avoid affecting your data and business, you must ensure the security of the private key.
- UserSigs generated by the default API of the IM backend SDK are valid for 180 days. Developers can use the API with the validity parameter to customize the validity period. Developers must obtain a new UserSig from the developer backend before the original UserSig expires.
Some IM services require admin permissions, for example, calling RESTful APIs, disbanding a group, and pushing to all group members. The role of app admin has the highest level of privileges. Compared with ordinary accounts:
- It has higher read permissions. For example, it can obtain all groups within the app and any information about any group.
- It has higher operation permissions. For example, it can send messages to any user and add or delete members in any group.