Retrieve Profile Details

Get User Profile Detail#

To get the Profile detail of the user, send a request as described below.

await SDK.getUserProfile(`TO_USER_JID`);

Request Param#

StatusDescriptionTypeRequired
TO_USER_JIDJID of the To UserJID Stringtrue

Response Format:#

{
statusCode: 200,
message: "Success",
data: {
email: "", // String - User Email
image: "", // String - User Profile Image
thumbImage: "", // String - User Profile ThumbImage
fromUser: "", // String - From User Jid
nickName: "", // String - User Nickname
mobileNumber: "", // String - User Mobile Number
userStatus: "", // String - Use Profile Status
}
}
note
userprofilelistener also will be triggered with the same response.

Get User's Last Seen Time#

To get the user's last seen, send a request as described below.

await SDK.getLastSeen(`TO_USER_JID`);

Request Param#

StatusDescriptionTypeRequired
TO_USER_JIDJID of the To UserJID Stringtrue

Response Format:#

{
statusCode: 200,
message: "Success",
data: {
fromUserJid: "", // String - From User Jid
seconds: 0, // Number - In Seconds
}
}

Get Current User Jid#

To get the Jid of the logged in user.

await SDK.getCurrentUserJid();

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString
userJidJID of the UserJID String

Get User Token#

Generates and retrives new usertoken to access the API.

await SDK.getUserToken(`USERNAME`, `PASSWORD`);

Request Params#

StatusDescriptionTypeRequired
USERNAMEUsernameStringtrue
PASSWORDPasswordStringtrue

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString
userTokenUser TokenString