Chat APIs and In-app Messaging SDKs for Developers, by Developers

Applozic powers multi-platform Chat APIs and in-app Messaging SDKs for Android, iOS and the Web that will enable you to build advanced in-app chat solutions your users will love.

Integrate chat in your application with completely customizable UI kits, powerful messaging APIs and SDKs, developed with exceptional security measures in mind.

Documentation    API Explorer

Authentication

Web Chat Core SDK Authentication

Login or Register with and email ID and password.

Applozic creates a new user if the user doesn't exists.

Login a User

client.login('[email protected]', 'user-password');

Sample Code

import { useMutation, useQueryClient } from "react-query";
import { useApplozicClient } from "../../providers/useApplozicClient";
import { LoginResult } from "@applozic/core-sdk";
import { useToast } from "@chakra-ui/react";

function useUserLogin() {
  const { client, loginResult } = useApplozicClient();
  const queryClient = useQueryClient();
  const toast = useToast();
  return useMutation(
    async ({ email, password }: { email: string; password: string }) => {
      return await client?.login(email, password);
    },
    {
      onSuccess: (data) => {
        if ((data as any) === "INVALID_APPID") {
          queryClient.setQueryData<LoginResult | null>(
            ["self"],
            null
          );
          toast({
            title: "Error logging in",
            description: (data as any).toString(),
            status: "error",
          });
        } else {
          if (data) {
            queryClient.setQueryData<LoginResult>(["self"], data);
          }
        }
      },
    }
  );
}

export default useUserLogin;

Updated about a month ago


What's Next

Conversation

Authentication


Web Chat Core SDK Authentication

Suggested Edits are limited on API Reference Pages

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