How can I get myUserID?

When I create a meeting like this:
const api = new JitsiMeetExternalAPI(domain, options);
How can I get my user ID? I need it to execute grantModerator

You cannot set yourself as moderator if you are not already a moderator