/ SDKs / Unreal
SDKs
Chat SDKs Unreal v3
Chat SDKs Unreal
Chat SDKs
Unreal
Version 3

Retrieve user metadata

Copy link

You can retrieve user metadata by creating a List of keys to retrieve and passing it as an argument to a parameter in the GetMetaData() method. A std::map<std::wstring, std::wstring> will return key-value items through the handler callback function.

SBDUser* currentUser = SBDMain::GetCurrentUser();

std::vector<std::wstring> keys;
keys.push_back(L"key1");
keys.push_back(L"key2");

currentUser->GetMetaData(keys, [](const std::map<std::wstring, std::wstring>& meta_data, SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }
});