getLoginUser

Introduction

Get the ID of the current logged in user.

You can get the ID of the current logged in user, after logged in.

The result data will be empty, if logged in failed.

Parameter details

This API has no parameters

Returned template

V2TimValueCallback<String>

{
    code : int
    desc : String
    data : String
}

Return value details

name type description
code int Request result: Error codes. 0 means success.
desc String The description of the error. It will be empty if success.
data String The ID of the current logged in user.

Code example

    V2TimValueCallback<String> getLoginUserRes =
        await TencentImSDKPlugin.v2TIMManager.getLoginUser();
    if (getLoginUserRes.code == 0) {
      getLoginUserRes.data; 
    }

results matching ""

    No results matching ""