| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Use the REST API to manage Git SSH keys of authenticated users.
If a request URL does not include a {username} parameter then the response will be for the signed-in user (and you must pass authentication information with your request). Additional private information, such as whether a user has two-factor authentication enabled, is included when authenticated through OAuth with the user scope.
Lists the public SSH keys for the authenticated user's GitHub account.
OAuth app tokens and personal access tokens (classic) need the read:public_key scope to use this endpoint.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default: 30 |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default: 1 |
| Status code | Description |
|---|---|
| 200 | OK |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
Response
Adds a public SSH key to the authenticated user's GitHub account.
OAuth app tokens and personal access tokens (classic) need the write:public_key scope to use this endpoint.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
title string A descriptive name for the new key. |
key string Required The public SSH key to add to your GitHub account. |
| Status code | Description |
|---|---|
| 201 | Created |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
| 422 | Validation failed, or the endpoint has been spammed. |
Response
View extended details for a single public SSH key.
OAuth app tokens and personal access tokens (classic) need the read:public_key scope to use this endpoint.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
key_id integer Required The unique identifier of the key. |
| Status code | Description |
|---|---|
| 200 | OK |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
Response
Removes a public SSH key from the authenticated user's GitHub account.
OAuth app tokens and personal access tokens (classic) need the admin:public_key scope to use this endpoint.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
key_id integer Required The unique identifier of the key. |
| Status code | Description |
|---|---|
| 204 | No Content |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
Response
Lists the verified public SSH keys for a user. This is accessible by anyone.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
This endpoint can be used without authentication or the aforementioned permissions if only public resources are requested.
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
username string Required The handle for the GitHub user account. |
| Name, Type, Description |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default: 30 |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default: 1 |
| Status code | Description |
|---|---|
| 200 | OK |
Response
| Back | FazBrowse Home | New Git URL |