What is a GitHub gist?
About GitHub gists
One of GitHub's most innovative features is Gist, which lets you store and distribute code snippets without setting up a full-fledged repository. Code strings, bash scripts, markdown, text files, and other small pieces of data are all acceptable alternatives to just code snippets. It can be used to quickly distribute a piece of code to others for anything like a demonstration, a how-to, or any solution without setting up a standard repository. Additionally, you can use it to embed elsewhere or on your website.
Effectively Use GitHub gists
Create a gist
You can use your gist homepage or GitHub account to create a gist.
Step 1:
From your GitHub account, you can choose New gist from the Create Menu orthe plus icon to the left of your profile icon in the upper right of the window.

If you are already on the GitHub gist website, you can easily create gists by clicking the Create Menu (plus icon).

Step 2:
In the gist description section, you can enter a description of your gist (optional). In the Filename including extension section, enter the name of your file. Your file name should include the file extension, depending on the gist you create. For example, if you are creating a Python sample gist, you can add the .py extension at the end of your file, as in sample.py.

Step 3:
Enter your code in the numbered lines. Once you have completed your code, click Create secret gist or the down arrow next to it for further options. You can make your code public or secret after writing it. If you set it to secret, only the person with access to your gist URL can see it.

Your GitHub gist is now ready for sharing with whomever you choose. You can copy your gist's embed code if you want to embed it.

To view your gists, navigate to click your profile picture to open the dropdown menu and select Your gists.

Edit or Delete a gist
Here are some of the options you have with your GitHub gists in the upper right-hand of the window:
- Edit.
- Delete.
- Subscribe or Unsubscribe.
- Star.
- Embed, Copy, and Share.
- Download a raw or zipped copy.

You can use multiple methods to share a gist. You can:
- Embed it into a website.
- Copy a shareable link to send.
- Clone with Git or checkout with SVN using the repository's web address (Clone via HTTPS).
- Cloning with an SSH key and passphrase from your GitHub settings (Clone via SSH).

GitHub gists Authentication Process
You must authenticate to access some GitHub resources for added account security. You provide or confirm credentials that are specific to you when you authenticate with GitHub to demonstrate that you are who you say you are. There are many ways to access resources in GitHub, including the browser, application programming interface (API), or command line. GitHub supports a variety of authentication methods through each method of access, like username and password with two-factor authentication, Personal access token, and SSH key.
Authenticating in Your Browser
If you're a part of an enterprise with managed users, you'll use your IdP to log in to GitHub in your browser. Your GitHub.com username and password are used to authenticate if you are not a part of an enterprise with managed users. Additionally, you can use SAML single sign-on and two-factor authentication, which may be required by business and organization owners.
Username and Password Only
When you create an account on GitHub, you'll create a password. Using a password manager to create a random and special password is advised. When you first sign in from an unfamiliar device, such as a new browser profile, a browser where the cookies have been deleted, or a new computer, GitHub will request additional verification if you have not enabled 2FA. You will be required to enter a verification code emailed to you after entering your username and password. Instead, you'll get a notification on the GitHub Mobile app if you have it downloaded.
Two-Factor Authentication (2FA) - Recommended
GitHub will ask you for a code generated by a time-based one-time password (TOTP) application on your mobile device or sent to you as a text message if you enable 2FA after you successfully enter your username and password (SMS). You can use GitHub Mobile or a security key with WebAuthn as an additional authentication method in addition to the TOTP application or text message authentication.
SAML Single Sign-On
It's possible that you must also authenticate through an IdP in order to access resources owned by a company or enterprise account that uses SAML single sign-on.
Authenticating With an API
You can use API to authenticate in various ways.
Personal Access Tokens
You may only access the API using a personal access token in specific circumstances, such as testing. You can revoke access at any time by using a personal access token. You can refer to the article Creating a personal access token for more details.
Web Application Flow
You should use the web application flow to authenticate OAuth Apps in production. You can refer to the article Authorizing OAuth Apps for more details.
GitHub Apps
You should authenticate on behalf of the app installation for GitHub Apps that are in production. You can refer to the article Authenticating with GitHub Apps for more details.
Authenticating With Command Line
GitHub repositories can be accessed via HTTPS or SSH from the command line, each of which has a unique authentication method. If you choose to clone the repository using an HTTPS or SSH remote URL, the authentication method depends on that decision.
You can still access and edit all repositories on GitHub over HTTPS, even if you are behind a firewall or proxy. If you use the GitHub CLI, you can use a personal access token or a web browser to log in. If you do not use the GitHub CLI to authenticate, you must use a personal access token. When Git asks for your password, enter your personal access token.
Although firewalls and proxies may refuse SSH connections, you can work with all GitHub repositories via SSH. The GitHub CLI will prompt you to choose an SSH public key for upload if it detects any on your computer during GitHub CLI authentication. GitHub CLI can create a new SSH public/private key pair and upload it to your GitHub.com account if it cannot locate an existing SSH public key for upload.
After that, you have a choice between using a personal access token or a web browser to authenticate. You must create an SSH public/private key pair on your local computer and add the public key to your GitHub.com account in order to authenticate without using the GitHub CLI. You'll be prompted to enter your SSH key passphrase each time you use Git to authenticate with GitHub unless you've stored the key.
GitHub gists Types
There are two types of GitHub gists available. Public and Secret. Public GitHub gists show up in Discover, where people can browse new GitHub gists as they're created. They're also searchable, so you can use them if you'd like other people to find and see your work. Unless you are logged in and the secret gist's author, secret GitHub gists do not appear in Discover and cannot be searched.
Secret GitHub gists aren't exactly private. A friend will be able to see a secret GitHub gist if you send them the URL. However, your gist GitHub will also be visible to anyone who finds the URL, including people you don't know. Instead, you might want to create a private repository if you need to keep your code hidden from prying eyes.
Public GitHub gists
Sort the list of public GitHub gists from most recent to least recent updates. You can fetch up to 3000 gists using pagination. For instance, you could retrieve 30 pages with 100 gists each or 100 pages with 30 gists each.
To list public GitHub gists, use the following code format.

Code Samples
#CURL
curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <YOUR-TOKEN>" https://api.github.com/gists/public
#GitHub CLI
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api \
-H "Accept: application/vnd.github+json" \
/gists/public
#JavaScript
// Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('GET /gists/public{?since,per_page,page}', {})
Response
Status: 200
[
{
"url": "https://api.github.com/gists/aa5a315d61ae9438b18d",
"forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks",
"commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits",
"id": "aa5a315d61ae9438b18d",
"node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk",
"git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
"git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
"html_url": "https://gist.github.com/aa5a315d61ae9438b18d",
"files": {
"hello_world.rb": {
"filename": "hello_world.rb",
"type": "application/x-ruby",
"language": "Ruby",
"raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb",
"size": 167
}
},
"public": true,
"created_at": "2022-10-14T02:15:15Z",
"updated_at": "2022-11-22T11:34:15Z",
"description": "Hello World Examples",
"comments": 0,
"user": null,
"comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"truncated": false
}
]
Parameters
Headers
Name | Type | Description |
accept | string | Setting to application/vnd.github+json is recommended. |
Query Parameters
Name | Type | Description |
since | string | Show updates to notifications only after the specified time. The following timestamp is in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
per_page | integer | The number of results per page (max 100).Default: 30 |
page | integer | Page number of the results to fetch.Default: 1 |
HTTP Response Status Codes
Status code | Description |
200 | OK |
304 | Not modified |
403 | Forbidden |
422 | Validation failed, or the endpoint has been spammed. |
Starred GitHub gists
To list the authenticated user's starred GitHub gists, you can use the following code format.

Code Samples
#CURL
curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <YOUR-TOKEN>" https://api.github.com/gists/starred
#GitHub CLI
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api -H "Accept: application/vnd.github+json" /gists/starred
#JavaScript
// Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('GET /gists/starred{?since,per_page,page}', {})
Response
Status: 200
[
{
"url": "https://api.github.com/gists/aa5a315d61ae9438b18d",
"forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks",
"commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits",
"id": "aa5a315d61ae9438b18d",
"node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk",
"git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
"git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
"html_url": "https://gist.github.com/aa5a315d61ae9438b18d",
"files": {
"hello_world.rb": {
"filename": "hello_world.rb",
"type": "application/x-ruby",
"language": "Ruby",
"raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb",
"size": 167
}
},
"public": true,
"created_at": "2022-10-14T02:15:15Z",
"updated_at": "2022-11-22T11:34:15Z",
"description": "Hello World Examples",
"comments": 0,
"user": null,
"comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"truncated": false
}
]
Parameters
Headers
Name | Type | Description |
accept | string | Setting to application/vnd.github+json is recommended. |
Query Parameters
Name | Type | Description |
since | string | Show updates to notifications only after the specified time. The following timestamp is in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
per_page | integer | The number of results per page (max 100).Default: 30 |
page | integer | Page number of the results to fetch.Default: 1 |
HTTP Response Status Codes
Status code | Description |
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
GitHub gists Commits
To list GitHub gist commits, you can use the following code format.

Code Samples
#CURL
curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <YOUR-TOKEN>" https://api.github.com/gists/GIST_ID/commits
#GitHub CLI
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api -H "Accept: application/vnd.github+json" /gists/GIST_ID/commits
#JavaScript
// Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('GET /gists/{gist_id}/commits{?per_page,page}', {
gist_id: 'GIST_ID'
})
Response
Status: 200
[
{
"url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f",
"version": "57a7f021a713b1c5a6a199b54cc514735d2d462f",
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"change_status": {
"deletions": 0,
"additions": 180,
"total": 180
},
"committed_at": "2022-10-14T02:15:15Z"
}
]
Parameters
Headers
Name | Type | Description |
accept | string | Setting to application/vnd.github+json is recommended. |
Path Parameters
Name | Type | Description |
gist_id | string | The unique identifier of the gist. |
Query Parameters
Name | Type | Description |
per_page | integer | The number of results per page (max 100).Default: 30 |
page | integer | Page number of the results to fetch.Default: 1 |
HTTP Response Status Codes
Status code | Description |
200 | OK |
304 | Not modified |
403 | Forbidden |
404 | Resource not found |
List GitHub gist Forks
To list GitHub gist forks, you can use the following code format.

Code Samples
#CURL
curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <YOUR-TOKEN>" https://api.github.com/gists/GIST_ID/forks
#GitHub CLI
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api \
-H "Accept: application/vnd.github+json" \
/gists/GIST_ID/forks
#JavaScript
// Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('GET /gists/{gist_id}/forks{?per_page,page}', {
gist_id: 'GIST_ID'
})
Response
Status: 200
[
{
"url": "https://api.github.com/gists/aa5a315d61ae9438b18d",
"forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks",
"commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits",
"id": "aa5a315d61ae9438b18d",
"node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk",
"git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
"git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
"html_url": "https://gist.github.com/aa5a315d61ae9438b18d",
"files": {
"hello_world.rb": {
"filename": "hello_world.rb",
"type": "application/x-ruby",
"language": "Ruby",
"raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb",
"size": 167
}
},
"public": true,
"created_at": "2022-10-14T02:15:15Z",
"updated_at": "2022-11-22T11:34:15Z",
"description": "Hello World Examples",
"comments": 1,
"user": null,
"comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
}
}
]
Parameters
Headers
Name | Type | Description |
accept | string | Setting to application/vnd.github+json is recommended. |
Path Parameters
Name | Type | Description |
gist_id | string | The unique identifier of the gist. |
Query Parameters
Name | Type | Description |
per_page | integer | The number of results per page (max 100).Default: 30 |
page | integer | Page number of the results to fetch.Default: 1 |
HTTP Response Status Codes
Status code | Description |
200 | OK |
304 | Not modified |
403 | Forbidden |
404 | Resource not found |
Fork a GitHub gists
To fork a GitHub gist, you can use the following code format.

Code Samples
#CURL
curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <YOUR-TOKEN>" https://api.github.com/gists/GIST_ID/forks
#GitHub CLI
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/gists/GIST_ID/forks
#JavaScript
// Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('POST /gists/{gist_id}/forks', {
gist_id: 'GIST_ID'
})
Response
Status: 201
{
"url": "https://api.github.com/gists/aa5a315d61ae9438b18d",
"forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks",
"commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits",
"id": "aa5a315d61ae9438b18d",
"node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk",
"git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
"git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
"html_url": "https://gist.github.com/aa5a315d61ae9438b18d",
"files": {
"hello_world.rb": {
"filename": "hello_world.rb",
"type": "application/x-ruby",
"language": "Ruby",
"raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb",
"size": 167
}
},
"public": true,
"created_at": "2022-10-14T02:15:15Z",
"updated_at": "2022-11-22T11:34:15Z",
"description": "Hello World Examples",
"comments": 0,
"user": null,
"comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"truncated": false
}
Parameters
Headers
Name | Type | Description |
accept | string | Setting to application/vnd.github+json is recommended. |
Path Parameters
Name | Type | Description |
gist_id | string | The unique identifier of the gist. |
HTTP Response Status Codes
Status code | Description |
201 | Created |
304 | Not modified |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Checking GitHub gist Star Status
To check GitHub gists Star Status, you can use the following code format.

Code Samples
#CURL
curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <YOUR-TOKEN>" https://api.github.com/gists/GIST_ID/star
# GitHub CLI
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api \
-H "Accept: application/vnd.github+json" \
/gists/GIST_ID/star
#JavaScript
// Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('GET /gists/{gist_id}/star', {
gist_id: 'GIST_ID'
})
Parameters
Headers
Name | Type | Description |
accept | string | Setting to application/vnd.github+json is recommended. |
Path Parameters
Name | Type | Description |
gist_id | string | The unique identifier of the gist. |
HTTP Response Status Codes
Status code | Description |
204 | No Content |
304 | Not modified |
403 | Forbidden |
404 | Resource not found |
Starring a GitHub gists
To unstar GitHub gists, you can use the following code format.

Code Samples
#CURL
curl -X PUT -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <YOUR-TOKEN>" https://api.github.com/gists/GIST_ID/star
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api --method PUT -H "Accept: application/vnd.github+json" /gists/GIST_ID/star
#JavaScript
// Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('PUT /gists/{gist_id}/star', {
gist_id: 'GIST_ID'
})
Keep in mind that when calling out to this endpoint, you must set the Content-Length parameter to zero.
Parameters
Headers
Name | Type | Description |
accept | string | Setting to application/vnd.github+json is recommended. |
Path Parameters
Name | Type | Description |
gist_id | string | The unique identifier of the gist. |
HTTP Response Status Codes
Status code | Description |
204 | No Content |
304 | Not modified |
403 | Forbidden |
404 | Resource not found |
Unstar a GitHub gists
To unstar GitHub gists, you can use the following code format.

Code Samples
#CURL
curl -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <YOUR-TOKEN>" https://api.github.com/gists/GIST_ID/star
#GitHub CLI
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api --method DELETE -H "Accept: application/vnd.github+json" /gists/GIST_ID/star
#JavaScript
// Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('DELETE /gists/{gist_id}/star', {
gist_id: 'GIST_ID'
})
Parameters
Headers
Name | Type | Description |
accept | string | Setting to application/vnd.github+json is recommended. |
Path Parameters
Name | Type | Description |
gist_id | string | The unique identifier of the gist. |
HTTP Response Status Codes
Status code | Description |
204 | No Content |
304 | Not modified |
403 | Forbidden |
404 | Resource not found |
Wrapping Up
As you can see, the gist is a helpful way to keep your random data. The possibilities for using GitHub gists are only limited by your creativity.
And while you write code for your next project, let Liquid Web take care of the hosting aspect. Our VPS Hosting, Cloud Dedicated Servers, and Dedicated Servers are the performance lift your project needs. Contact our sales team today to get started.
Related Articles:

About the Author: Mohammed Noufal
Mohammed Noufal has worked as a senior server administrator for 8+ years. He can be found on LinkedIn to know more or connect.
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
2024 cPanel and Plesk pricing breakdown
Read ArticleCentOS Linux 7 EOL — everything you need to know
Read ArticleHow to install Node.js on Linux (AlmaLinux)
Read ArticleUpgrading or installing PHP on Ubuntu — PHP 7.2 and Ubuntu 22.04
Read ArticleWhy is your IP blocked?
Read Article