Let's integrate our SDK in few minutes
#
Getting started#
IntroductionThrough our Chat SDK for Web, you can efficiently integrate real-time chat into your web app. On the client-side implementation, you can initialize, configure and build the chat with minimal effort.
On the server-side, MirrorFly ensures reliable infra-management services for your chat within the app. All server setup related documents can be downloaded from control panel's download section. This and Initialization page provide the Chat SDK’s structure and installation steps, then goes through the preliminary steps of implementing the Chat SDK in your own project.
Note : The fastest way to see our Chat SDK in action is to build your chat app on top of our sample app. Make sure to change the application ID of the sample app to your own. To download sample app click here
#
Supported browsersBrowser | Supported versions |
---|---|
Edge | 13 or higher |
Chrome | 16 or higher |
Firefox | 11 or higher |
Safari | 7 or higher |
#
SDK License KeyYour SDK must be authenticated by MirrorFly server using License Key.
Please follow below step to get your license key:
Step 1: Create an account here in MirrorFly console, if you already have an account please goto step 3.
Step 2: Validate your account by following the steps provided in console and login to your account.
Step 3: Please login to your account here
Step 4: Copy license key under "Application info" in "Overview" page
#
SDK InstallationStep 1: Download the latest SDK from MirrorFly Control Panel Download's section
Step 2: Extract the files from downloaded zip file and copy the dist folder into your application
Step 3: Include MirrorFly's script file into your index.html
Step 4: Create a new file SDK.js
in the project root and past below code.
Step 5: Import the SDK into your application
#
SDK Installation for React NativeStep 1: Download the latest SDK from MirrorFly Control Panel Download's section
Step 2: Extract the files from downloaded zip file and copy all the files from dist
folder
Step 3: Create a new folder inside your project and paste all the copied files inside the folder
Step 4: Create a file SDK.js
( you can name it as you want ) to export the SDK Object as follows. And then you can import the SDK Object from this file and use it.
Step 5: Make sure you install all the below mentioned peer dependencies with the version specified.
react-native
version should beany version
@react-native-async-storage/async-storage
version should beany version
react-native-get-random-values
version should be>=1.7.1
#
SDK Installation for AngularStep 1: Download the latest SDK from MirrorFly Control Panel Download's section.
Step 2: Extract the files from the downloaded zip file and copy all the files from the SDK
folder.
Step 3: Create a new folder inside your project's Root folder and paste all the copied files inside the folder.
Step 4: Open your angular.json
and find the property build => options => scripts
, inside the scripts array, add the relative file paths of Downloaded SDK JS files.
Step 5: Add the below line in the Root component (before @Component Decorator).
Step 6: Inside the Root component's ngOnInit
follow our Initialization process.
Note: Minimum Required Angular version 8.3.29
#
TerminologyThe below table contains some mostly used keywords in sdk with their explanation
Keyword | Explanation |
---|---|
userId | Unique ID assigned for each user Ex: 12345678 (any alphanumeric). The below characters is not allowed in userId: U+0022 (") U+0026 (&) U+0027 (') U+002F (/) U+003A (:) U+003C (<) U+003E (>) U+0040 (@) userID should follow below specification: https://xmpp.org/extensions/xep-0106.html |
userJid | userID+@+domain of the chat server Ex. 12345678@xmpp.chatsystem.dev.contus.us |
groupJid | Unique ID assigned for each group Ex: group123456 (any alphanumeric). GroupJID = groupID +@mix.+domain of the chat server Ex: group123456@mix.xmpp.mirrorfly.dev.contus.us` |