How to retrieve IBM connections user id for a profile using Profiles API in JAVA?

StackOverflow https://stackoverflow.com/questions/18923850

  •  29-06-2022
  •  | 
  •  

문제

I am new to IBM SBT and need some help to fetch the userid for a profile based on first name, last name or email id from the IBM connections profiles API.

I am planning to do a post on the activity stream on behalf of someone else and I need the user id of this someone else so that I can do a post on his behalf.

Any help is highly appreciated.

도움이 되었습니까?

해결책

This returns the IBM Connections user's UUID:

ProfileService profileService = new ProfileService();
connectionsUuid = profileService.getProfile(emailAddress).getId();

If the String emailAddress contains an @, it searches by email address, otherwise, it searches by username, so these would return the same UUID for the IBM persona "Frank Adams":

connectionsUuid = profileService.getProfile("fadams@demos.ibm.com").getId();
connectionsUuid = profileService.getProfile("fadams").getId();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top