Users
Get User Token#
Generates and retrives new usertoken to access the API.
Request Params#
| Status | Description | Type | Required |
|---|---|---|---|
USERNAME | Username | String | true |
PASSWORD | Password | String | true |
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
| userToken | User Token | String |
Set User Token#
To set the user token locally.
Request Params#
| Status | Description | Type | Required |
|---|---|---|---|
TOKEN | User Token | String | true |
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Get Current User Jid#
To get the Jid of the logged in user.
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
| userJid | JID of the User | JID String |
User List#
To retrieve all registered users on MirrorFly SDK use below method. User list can also be retrieved based on search key word, also this method supports pagination. This function will return the total number of pages.
warning
User presence and Profile instant update will not happen until a message is sent to that particular user.
Request Params#
| Arguments | Description | Type | Required |
|---|---|---|---|
| SEARCH_TERM | Search term to search against the name default value is empty | String | false |
| PAGE_NUMBER | Page number to get the particular pages default value is 1 | Number | false |
| LIMIT | Limit to set the number of users per page default value is 20 | Number | false |
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
| totalPages | Total pages based on the limit | Number |
| totalUsers | Total users registered to the application | Number |
| users | Array of Users Object | Array |
Response Format:#
Logout#
To disconnect the XMPP connection, use the below method.
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |