Discussion created by coursed on Jul 25, 2019
Latest reply on Jul 25, 2019 by Peter Love

How do I get the user id with REST please?


Is there a REST API location for us to hit which would indicate which user id is logged in please? I'm struggling to pull the logged in user's id from any of the API calls (however, is that by design?).


e.g., GET /learn/api/public/v1/user/whoami 


I want their user id so I can cross reference it with the group user list (/learn/api/public/v2/courses/_XY_Z/groups/_FOO_B/users) to see if the logged in user is a part of a group and also use the api to add them to certain groups.


Any steer on using the API to pull the logged in username much appreciated! 


Thanks for any help! Best, DanC