'How can I use Github API to get a list of users added to a repository

I would like to get all users and teams for a GitHub repository using the API. I can get the teams by using this: https://docs.github.com/en/rest/reference/repos#list-repository-teams

However, I did not find how to get the list of users added directly to the project. In the following image, I have Team A & Team B, that are returned by the API endpoint previously mentioned. However the user me is not returned.

team a/me/ team b

Any pointers on how I could get all the information I need?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source