Chat APIs and In-app Messaging SDKs for Developers

Applozic provides Chat APIs and In-app Messaging SDKs for Android, iOS and Web apps to power cross-device, multi-platform rich messaging.
Find comprehensive guides and platform-specific Chat API documentation to get started with In-app Messaging.

Get Started    

Ionic/Phonegap/Cordova

User authentication guide

User Registration/Login

🚧

Note

Please remember you have to log in once and only after you log out you must log in again. Use below code to check if the user is already logged in.

To use any function of applozic, you need to declare applozic variable at the bottom of the file where you want to call applozic functions.

/// Add this line at the end of the file where you want to call applozic functions
declare var applozic: any;

You can check if the user is logged in to applozic or not by using:

applozic.isLoggedIn(function(response) {
          if (response == "true") {
            /// User is already logged in
          } else {
            /// User is not logged in yet
          }
        }, function() {});

Create Applozic user and pass user to login() function as below:

var alUser = {
            'userId' : userId,   //Replace it with the userId of the logged in user NOTE : userId need to be string and  +,*,? are not allowed chars in userId.
            'password' : password,  //Put password here
            'authenticationTypeId' : 1,
            'applicationId' : '<APP_ID>',  //replace <APP_ID> with App ID from Applozic Dashboard.
            'displayName':'display name of user', //Set the display name of user to show in chat screen 
           'imageLink':'https://raw.githubusercontent.com/AppLozic/Applozic-Android-SDK/master/img/android.png'
        };

   applozic.login(alUser, function(response) {
       applozic.registerPushNotification(function() {}, function(){});
       applozic.launchChat(function() {}, function() {});
   }, function(error) {});

📘

Call it after the platform is ready.

Note: applozic.login function should be called only once during the login process throughout the app until you logout explicitly.

platform.ready().then(() => {
           var alUser = {
            'userId' : 'debug3',   //Replace it with the userId of the logged in user NOTE : userId need to be string and  +,*,? are not allowed chars in userId.
            'password' : 'debug3',  //Put password here
            'authenticationTypeId' : 1,
            'applicationId' : 'APP_ID', //replace <APP_ID> with App ID from Applozic Dashboard
              'displayName':'display name of user' //Set the display name of user to show in chat screen 
        };

       applozic.login(alUser, function(response) {
                    applozic.launchChat(function() {}, function() {});
                }, function(error) {});
    });

Updated 3 months ago


What's Next

Conversation

Ionic/Phonegap/Cordova


User authentication guide

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.