REST-API-Endpunkte für Follower
Verwende die REST-API, um Informationen zu Followerinnen authentifizierter Benutzerinnen abzurufen.
Informationen zur Verwaltung von Followern
Wenn eine Anforderungs-URL keinen {username}-Parameter enthält, gilt die Antwort für dendie angemeldeten Benutzer*in (und Sie müssen Authentifizierungsinformationen mit Ihrer Anforderung übergeben). Zusätzliche private Informationen, z. B. ob ein Benutzer die zweistufige Authentifizierung aktiviert hat, werden bei der Authentifizierung über die Standardauthentifizierung oder OAuth mit dem user Zugriffsbereich eingeschlossen.
List followers of the authenticated user
Lists the people following the authenticated user.
Fine-grained access tokens for "List followers of the authenticated user"
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
- "Followers" user permissions (read)
Parameter für "List followers of the authenticated user"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Standard: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Standard: |
HTTP response status codes for "List followers of the authenticated user"
| Status code | BESCHREIBUNG |
|---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Code samples for "List followers of the authenticated user"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/user/followersResponse
Status: 200[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
}
]List the people the authenticated user follows
Lists the people who the authenticated user follows.
Fine-grained access tokens for "List the people the authenticated user follows"
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
- "Followers" user permissions (read)
Parameter für "List the people the authenticated user follows"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Standard: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Standard: |
HTTP response status codes for "List the people the authenticated user follows"
| Status code | BESCHREIBUNG |
|---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Code samples for "List the people the authenticated user follows"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/user/followingResponse
Status: 200[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
}
]Check if a person is followed by the authenticated user
Fine-grained access tokens for "Check if a person is followed by the authenticated user"
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
- "Followers" user permissions (read)
Parameter für "Check if a person is followed by the authenticated user"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
username string ErforderlichThe handle for the GitHub user account. |
HTTP response status codes for "Check if a person is followed by the authenticated user"
| Status code | BESCHREIBUNG |
|---|---|
204 | if the person is followed by the authenticated user |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | if the person is not followed by the authenticated user |
Code samples for "Check if a person is followed by the authenticated user"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/user/following/USERNAMEif the person is followed by the authenticated user
Status: 204Follow a user
Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs."
OAuth app tokens and personal access tokens (classic) need the user:follow scope to use this endpoint.
Fine-grained access tokens for "Follow a user"
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
- "Followers" user permissions (write)
Parameter für "Follow a user"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
username string ErforderlichThe handle for the GitHub user account. |
HTTP response status codes for "Follow a user"
| Status code | BESCHREIBUNG |
|---|---|
204 | No Content |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Code samples for "Follow a user"
Request example
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/user/following/USERNAMEResponse
Status: 204Unfollow a user
OAuth app tokens and personal access tokens (classic) need the user:follow scope to use this endpoint.
Fine-grained access tokens for "Unfollow a user"
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
- "Followers" user permissions (write)
Parameter für "Unfollow a user"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
username string ErforderlichThe handle for the GitHub user account. |
HTTP response status codes for "Unfollow a user"
| Status code | BESCHREIBUNG |
|---|---|
204 | No Content |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
Code samples for "Unfollow a user"
Request example
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/user/following/USERNAMEResponse
Status: 204List followers of a user
Lists the people following the specified user.
Fine-grained access tokens for "List followers of a user"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token does not require any permissions.
This endpoint can be used without authentication if only public resources are requested.
Parameter für "List followers of a user"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
username string ErforderlichThe handle for the GitHub user account. |
| Name, Typ, BESCHREIBUNG |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Standard: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Standard: |
HTTP response status codes for "List followers of a user"
| Status code | BESCHREIBUNG |
|---|---|
200 | OK |
Code samples for "List followers of a user"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/users/USERNAME/followersResponse
Status: 200[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
}
]List the people a user follows
Lists the people who the specified user follows.
Fine-grained access tokens for "List the people a user follows"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token does not require any permissions.
This endpoint can be used without authentication if only public resources are requested.
Parameter für "List the people a user follows"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
username string ErforderlichThe handle for the GitHub user account. |
| Name, Typ, BESCHREIBUNG |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Standard: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Standard: |
HTTP response status codes for "List the people a user follows"
| Status code | BESCHREIBUNG |
|---|---|
200 | OK |
Code samples for "List the people a user follows"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/users/USERNAME/followingResponse
Status: 200[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
}
]Check if a user follows another user
Fine-grained access tokens for "Check if a user follows another user"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token does not require any permissions.
This endpoint can be used without authentication if only public resources are requested.
Parameter für "Check if a user follows another user"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
username string ErforderlichThe handle for the GitHub user account. |
target_user string Erforderlich |
HTTP response status codes for "Check if a user follows another user"
| Status code | BESCHREIBUNG |
|---|---|
204 | if the user follows the target user |
404 | if the user does not follow the target user |
Code samples for "Check if a user follows another user"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/users/USERNAME/following/TARGET_USERif the user follows the target user
Status: 204