Team members will include the members of child teams.
To get a user's membership with a team, the team must be visible to the authenticated user.
Note: You can also specify a team by org_id and team_id using the route GET /organizations/:org_id/team/:team_id/memberships/:username.
GET /orgs/:org/teams/:team_slug/memberships/:username
Note: The role for organization owners returns as maintainer. For more information about maintainer roles, see Create a team.
Status: 200 OK
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "member",
"state": "active"
}
Status: 200 OK
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "maintainer",
"state": "active"
}
Status: 200 OK
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "member",
"state": "pending"
}
Status: 404 Not Found