최근 검색
최근 검색 없음
Adding many users to groups via API
2023년 2월 03일에 게시됨
In the below statement for group membership via API.Can we also add email of the user instead of user_id and how it can achieved?
-X POST -d '{"group_memberships": [{"user_id": 72, "group_id": 88}, {"user_id": 73, "group_id": 88}]}' \
-H "Content-Type: application/json" -v -u {email_address}:{password}
Please help !
|
0
2
댓글 2개
Dave Dyson (gmail)
Hi Karan, I think you'd need to use the Search Users API endpoint, with the email address as the query, e.g. query="email:jdoe@example.com" in order to return the user record for each user, which would include that user's user id. You could do that for each user you want to look up, and collect the user ids for use in the Create Many Group Memberships API endpoint you want to use above.
0
karan sharma
0