Use the “Get Users” API to convert from a name to an ID.
Or use the oAuth token on the users API to get the ID for that token
You can see in this implicit auth example
The user will authenticate. then the token is passed directly to the users API to get the user data for that token