How to get userID with API v2?

I’ve been surfing through this API userID, where I can’t get any stuff except /getuserbyemail for v1 of REST API.
But what I need is that, using V2, How do I get the owner’s UserID?

Hi Goss, 

The user id can be found within the response of the GET https://api.zoom.us/v2/users/{userId} API call. Replace {userID} with your email and the ID property that comes back is the userID. 

Please refer to https://devdocs.zoom.us/api-reference/zoom-api/users/user

Yeah, But what if I don’t know user’s email, and not able to retrive Owner’s userID?
I mean, I’m serious that I can’t be able to extract my user’s Zoom mail ID as my user uses our Company’s mail ID for that app purpose, and different one for Zoom mail!

So, I tried implementing this following way.
I used this https://devdocs.zoom.us/api-reference/zoom-api/users/users users array[Object], and extracted the 0th index (or First User occurance of the List Users Object) user as the owner, and the subsequent index users as sub accounts.

Can you please ensure that 0th index will (always) be Owner’s userID or the Master userID?

Hi Goss, 

I’ll check back with the Engineers to see if we can make sure the 0th index will be the owners userID. 

same question with @Goss_Gowtham. How to retrieve the user id?

Hey @huynq0911,

You can easily get the userID by calling the List Users API, or for User Level OAuth apps, use the me keryword:

Thanks,
Tommy

Hi Tommy,
Although the answer is not my expectation, I found the way to get userid:
Request https://api.zoom.us/v2/users/{my_email} with bearer param which gets from the JWT Token in App Marketplace (developer.zoom.us API)

2 Likes

Hey @huynq0911,

Correct! That is another way to do it! :slight_smile: You can pass the Zoom users email instead of the userId to the Get User endpoint.

Thanks,
Tommy

1 Like