GetUserName not working in new meeting sdk 6.0.12

@chunsiong.zoom when i updated my sdk to 6.0.12 in meeting sdk linux
IUserInfo* userInfo = m_pParticipantsController->GetUserByUserID(userID);
std::cout << “Code reaching here 1” << std::endl;
std::string username = userInfo->GetUserName(); --my code broke after this line, i.e., the logs didnt reached the second cout
std::cout << “Code reaching here 2” << std::endl;

same is the issue with GetUserRole

@gianni.zoom also let me know how can i check sdk logs in linux

@chunsiong.zoom by when can i expect a response

@swatantra12singh if you need urgent support / response, please to consider signing up for a paid developer plan.

The developer forum does not have an SLA.

I’ve just tried 6.0.12 and it works fine.


Do note that GetUserName returns a zchar_t* datatype.

virtual const zchar_t* GetUserName() = 0;

ok @chunsiong.zoom can you tell me how can i check sdk logs in meeting sdk for linux

@chunsiong.zoom plus when i am trying to log userinfo(= m_pParticipantsController->GetUserByUserID(userID)) i am getting value as 0, what could be the possible cause of it?

this is the code snippet

m_pParticipantsController = m_pMeetingService->GetMeetingParticipantsController();
	IList<unsigned int>* participants = m_pMeetingService->GetMeetingParticipantsController()->GetParticipantsList();
	printf("Participants count: %d\n", participants->GetCount());
	int count = participants->GetCount();
    for (int i = 0; i < count; ++i) {
        unsigned int userID = participants->GetItem(i);
			std::cout << "Code reaching here" << userID  << std::endl;
			IUserInfo* userInfo = m_pParticipantsController->GetUserByUserID(userID);
			std::cout << "Code reaching here 1 " << userInfo << std::endl;
			std::cout << "Subscribing to raw video data for UserID: " << userID << "user name " << userInfo->GetUserName() << std::endl;


I’m doing something like this

	//get for all users
				IList<unsigned int >* pList = getAllUserObj();


				for (int i = 0; i < pList->GetCount(); ++i) {
					unsigned int userID = pList->GetItem(i);

					// Do something with userID
					m_pParticipantsController = m_pMeetingService->GetMeetingParticipantsController();
					IUserInfo* p = m_pParticipantsController->GetUserByUserID(userID);

and here is the helper method

//this is a helper method to get the first User Object, it is just an arbitary User Object
IList<unsigned int >* getAllUserObj() {
	m_pParticipantsController = m_pMeetingService->GetMeetingParticipantsController();
	IList<unsigned int >* ParticipantsList = m_pParticipantsController->GetParticipantsList();
	std::cout << "Participant List is : " << ParticipantsList->GetCount() << std::endl;
	return ParticipantsList;

Hi i tried the exact method you mentioned still my userinfo is 0 for GetMySelfUser i am getting value of 0x613e68b1ca88 but i am getting 0 for GetUserByUserID(userID) where user id is an int as well as unsigned int


@swatantra12singh is the person / SDK getting the participant a HOST?

@chunsiong.zoom can you rephrase the statement i am not able to get it?

i have made the sdk join both as host and as a participant

@swatantra12singh some of the methods requires you to be HOST or CO-HOST. If you do not have these privilege , the methods might throw you empty or error messages.

@chunsiong.zoom But in previous versions it had no such requirements.

@chunsiong.zoom if so is there any function or event that needs to be called to join the sdk bot with host privilage, i tried changing role in auth token but it didnt worked

@swatantra12singh did it only stop working in 6.0.12?

@chunsiong.zoom yes the last sdk i was using was 5.17.11 and it didnt break or give such a result, if i do revert to 5.17.11 its working but then we have issue of meeting status retrieval issue i.e., the code breaks abruuptly when there is a meeting status change from waiting to start

@swatantra12singh I’ve just rebuild my entire solution, and tested on 6.0.12

GetUserID and GetUserName works without HOST privilege.

@chunsiong.zoom can you share the code with me? because it am trying to impliment but i am getting error i have participant user id but GetUserByUserID is returning 0

thanks @chunsiong.zoom i was able to solve the issue but i realised there might be underlining bug in the flow

1 Like