# Check if a user is a repository collaborator

From **GitHub v3 REST API**.

`GET /repos/{owner}/{repo}/collaborators/{username}`

For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

Team members will include the members of child teams.

You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this
endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this
endpoint.

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

### `username`

- Location: path
- Required: true
- Type: `string`

## Responses

### `204`

Response if user is a collaborator

### `404`

Not Found if user is not a collaborator

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/collaborators/{username}
```
