{"componentChunkName":"component---src-templates-tag-js","path":"/tags/github/","result":{"data":{"site":{"siteMetadata":{"title":"LoginRadius Blog"}},"allMarkdownRemark":{"totalCount":2,"edges":[{"node":{"fields":{"slug":"/engineering/build-your-github-profile/"},"html":"<p>Github is great, as you may already know.</p>\n<p>But, did you ever think to make your profile attractive for potential employers, followers, recruiters, and visitors?</p>\n<p>Let's make a better version of it.</p>\n<h2 id=\"github-profile-image-frame\" style=\"position:relative;\"><a href=\"#github-profile-image-frame\" aria-label=\"github profile image frame permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Github Profile Image Frame</h2>\n<p>It's up to you to decide how you want this frame — photo-less, cartoon avatar, or best explaining image.</p>\n<p>For the best image, take a quality click; quality means not blurred, perfect lighting, and good posture.\nIf someone looks at the photo, it shall explain your personality.</p>\n<h2 id=\"github-profile-page\" style=\"position:relative;\"><a href=\"#github-profile-page\" aria-label=\"github profile page permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Github Profile Page</h2>\n<p>Github has a <a href=\"https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme\">feature called README</a> if you do not know already.</p>\n<p>Check out some listing of <a href=\"https://github.com/abhisheknaiidu/awesome-github-profile-readme\">awesome GitHub profiles</a>.</p>\n<p>To start this, first, you need to create a project that is the same as your GitHub username.</p>\n<p><strong>Example:</strong> My user name is <code>abhir9</code>, and I need to create a repo with the same name <code>abhir9</code> with a <code>README.md</code> file.</p>\n<p>This <code>README.me</code> will act as the profile page: <a href=\"https://github.com/abhir9\">abhir9</a></p>\n<p>It is the actual README file created using a repo with my GitHub username: <a href=\"https://github.com/abhir9/abhir9/blob/main/README.md\">abhir9</a></p>\n<p>Here you can add your quotes, hello statement, greetings, etc. It is connected to the viewer on your behalf.</p>\n<p>So write a short paragraph or a brief story to introduce yourself.</p>\n<p>There are some apps from contributors that extract the information based on your profile name and share stats and charts.</p>\n<ul>\n<li><a href=\"https://github-readme-stats.vercel.app\">github readme stats</a>\ne.g.: <code>https://github-readme-stats.vercel.app/api?username=abhir9&#x26;show_icons=true&#x26;count_private=true&#x26;theme=react</code></li>\n<li><a href=\"https://readme-typing-svg.herokuapp.com\">readme typing svg</a>\ne.g.: <code>https://readme-typing-svg.herokuapp.com?size=50&#x26;center=true&#x26;vCenter=true&#x26;width=800&#x26;height=100&#x26;lines=Namaste%20%F0%9F%99%8F%3BPranam%20%F0%9F%99%8F%3BKhamma%20Ghani%20%F0%9F%99%8F%3BVanakkam%20%F0%9F%99%8F%3BSat%20Sri%20Akaal%20%F0%9F%99%8F%3BAssalam%20Alaikum%20%F0%9F%99%8F%3B</code></li>\n<li><a href=\"https://views.whatilearened.today\">whatilearened</a>\ne.g.: <code>https://views.whatilearened.today/views/github/abhir9/abhir9.webp?cache=remove</code></li>\n<li><a href=\"https://github-readme-streak-stats.herokuapp.com\">github readme streak stats</a>\ne.g.: <code>https://github-readme-streak-stats.herokuapp.com/?user=abhir9&#x26;theme=react</code></li>\n<li>SVG Icons\ne.g.: <code>https://raw.githubusercontent.com/devicons/devicon/master/icons/ubuntu/ubuntu-plain.webp</code></li>\n</ul>\n<p>Many other online apps can be used per your need — e.g., how you want to decorate your profile page.</p>\n<h2 id=\"github-pinned-repos\" style=\"position:relative;\"><a href=\"#github-pinned-repos\" aria-label=\"github pinned repos permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Github Pinned Repos</h2>\n<p>Github allows you to pin up to 6 repos.</p>\n<p>Try to pin the best of your projects' repos. Mostly, people do visit these repos if they land on your profiles.</p>\n<h2 id=\"greeny-contributions\" style=\"position:relative;\"><a href=\"#greeny-contributions\" aria-label=\"greeny contributions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Greeny Contributions</h2>\n<p>There is a heat map that represents your contributions.</p>\n<p>Heat map graph will automatically generate as per your contributions. Try to keep it greener by contributing usefully to your favorite projects.</p>\n<h2 id=\"readme-for-every-project\" style=\"position:relative;\"><a href=\"#readme-for-every-project\" aria-label=\"readme for every project permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>README for Every Project</h2>\n<p>Whether it's a minor or significant project, add a well-descriptive README file. It helps anyone clearly understand what your project does and how they can contribute if they want to.</p>\n<p>Format it in a better way; if you don't know very much about Markdown format, you can use an online tool like <a href=\"https://pandao.github.io/editor.md/en.html\">Pandao</a></p>\n<p>You can use images, screenshots, gifs, resources list, contribution guidelines, license, etc.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"February 28, 2022","updated_date":null,"title":"How to Build Your Github Profile","tags":["Github"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/9538f6a4bb1b02fa3b5daf9e83f0e026/58556/index.webp","srcSet":"/static/9538f6a4bb1b02fa3b5daf9e83f0e026/61e93/index.webp 200w,\n/static/9538f6a4bb1b02fa3b5daf9e83f0e026/1f5c5/index.webp 400w,\n/static/9538f6a4bb1b02fa3b5daf9e83f0e026/58556/index.webp 800w,\n/static/9538f6a4bb1b02fa3b5daf9e83f0e026/99238/index.webp 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Abhimanyu Singh Rathore","github":"abhir9","avatar":null}}}},{"node":{"fields":{"slug":"/engineering/github-api/"},"html":"<h1 id=\"introduction-to-github-apis\" style=\"position:relative;\"><a href=\"#introduction-to-github-apis\" aria-label=\"introduction to github apis permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Introduction to Github APIs</h1>\n<h2 id=\"what-are-apis\" style=\"position:relative;\"><a href=\"#what-are-apis\" aria-label=\"what are apis permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What are APIs</h2>\n<p>API stands for Application Program Interfaces, which developers use to access web tools or information on the cloud. It allows different cross-platform applications to talk to each other.\nOne of the common examples of it is <a href=\"https://cloud.google.com/speech-to-text\">Google Speech to Text API</a> used when you talk to Google Assistant.</p>\n<h2 id=\"what-is-github-apis\" style=\"position:relative;\"><a href=\"#what-is-github-apis\" aria-label=\"what is github apis permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is <a href=\"https://developer.github.com/v3/\">Github APIs</a></h2>\n<p>Github APIs( or Github ReST APIs) are the APIs that you can use to interact with GitHub. They allow you to create and manage repositories, branches, issues, pull requests, and many more.\nFor fetching publicly available information (like public repositories, user profiles, etc.), you can call the API. For other actions, you need to provide an authenticated token.</p>\n<h2 id=\"basic-github-apis-examples\" style=\"position:relative;\"><a href=\"#basic-github-apis-examples\" aria-label=\"basic github apis examples permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Basic Github APIs Examples</h2>\n<p>The base URL for GitHub APIs is:- <a href=\"https://api.github.com/\">GithubAPI</a></p>\n<h3 id=\"accessing-public-information\" style=\"position:relative;\"><a href=\"#accessing-public-information\" aria-label=\"accessing public information permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Accessing Public Information</h3>\n<h4 id=\"fetching-user-information-with-its-username\" style=\"position:relative;\"><a href=\"#fetching-user-information-with-its-username\" aria-label=\"fetching user information with its username permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Fetching user information with its username</h4>\n<p>Request type: GET\nAPI endpoint: /users/{username}</p>\n<p>Example :- <code>curl https://api.github.com/users/devkapilbansal</code></p>\n<p><img src=\"/fcabf9d423b1a71e7e92aa365512c4e1/user_details.webp\" alt=\"user_details\"></p>\n<p>As you can see, API returns us a JSON response with info about the user, like its image<em>url, name, mail</em>address.</p>\n<h4 id=\"fetching-users-followers-list\" style=\"position:relative;\"><a href=\"#fetching-users-followers-list\" aria-label=\"fetching users followers list permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Fetching user's followers' list</h4>\n<p>Request type: GET\nAPI endpoint: /users/{username}/followers</p>\n<p>Example :- <code>curl https://api.github.com/devkapilbansal/followers</code></p>\n<p><img src=\"/1cae6a5b119732ee713738f1b2d9b51d/followers.webp\" alt=\"followers\"></p>\n<p>This URL returns info about all the users that follow a particular user.</p>\n<h4 id=\"check-if-a-user-follows-another\" style=\"position:relative;\"><a href=\"#check-if-a-user-follows-another\" aria-label=\"check if a user follows another permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Check if a user follows another</h4>\n<p>Request type: GET\nAPI endpoint: /user/{username}/following/{target_username}</p>\n<p>This endpoint doesn't return any content. It just returns a status code.</p>\n<p>A status code of 204 means the <code>target_user</code> is followed by the user, whereas a status code of 404 means the user does not follow a <code>target_user</code>.</p>\n<p>Example :- <code>curl https://api.github.com/devkapilbansal/following/KapilBansal</code></p>\n<p>When a user follows another user\n<img src=\"/57f8001411f9b8f5e38aad54e2d88e60/user_follows.webp\" alt=\"follow\"></p>\n<p>When a user doesn't follow another user\n<img src=\"/46b872a0a908417b69453e83a049ad01/user_not_follows.webp\" alt=\"not_follow\"></p>\n<h3 id=\"performing-tasks-as-an-authenticated-user\" style=\"position:relative;\"><a href=\"#performing-tasks-as-an-authenticated-user\" aria-label=\"performing tasks as an authenticated user permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Performing tasks as an authenticated user</h3>\n<p>If you provide an authenticated token, you don't need to provide a username in the endpoints mentioned above.</p>\n<p>By providing the token, you can create repositories/gists, comment on pull requests/issues, and all other tasks that you can perform from the Web Interface.</p>\n<h4 id=\"generating-token\" style=\"position:relative;\"><a href=\"#generating-token\" aria-label=\"generating token permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Generating Token</h4>\n<p>You can get a token by going to <a href=\"https://github.com/settings/tokens\">Personal access tokens</a> and clicking on <em>Generate new token</em>. You will be asked for the permissions/scopes of that token. Choose them <strong>wisely</strong> while creating one as some of these might be destructive.</p>\n<p>After selecting scopes, click on generate token and save the token somewhere as you will not see that token again.</p>\n<p><strong>Note</strong>:- Store your token in a secured environment while using it.</p>\n<h4 id=\"creating-a-repository\" style=\"position:relative;\"><a href=\"#creating-a-repository\" aria-label=\"creating a repository permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Creating a Repository</h4>\n<p>Request type: POST\nAPI endpoint: /user/{repos}\nRequired data: name</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" -d '{\"name\":\"Github API Testing\"}' https://api.github.com/user/repos</code></p>\n<p><img src=\"/477483cdbc31361f442752fe4d10b405/create_repo.webp\" alt=\"create repo\"></p>\n<h4 id=\"list-issues-assigned-to-you\" style=\"position:relative;\"><a href=\"#list-issues-assigned-to-you\" aria-label=\"list issues assigned to you permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>List issues assigned to you</h4>\n<p>Request type: GET\nAPI endpoint: /issues</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" https://api.github.com/issues</code></p>\n<p><img src=\"/e8efdf1818159d6bb8dcaf3d93e9ae4e/list_issues.webp\" alt=\"list issues\"></p>\n<h4 id=\"creating-an-issue\" style=\"position:relative;\"><a href=\"#creating-an-issue\" aria-label=\"creating an issue permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Creating an issue</h4>\n<p>Request type: POST\nAPI endpoint: /repos/{owner}/{repo_name}/issues\nRequired data: title</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" -d '{\"title\":\"Issue_For_Test\"}' https://api.github.com/repos/devkapilbansal/Github-API-Testing/issues</code></p>\n<p><img src=\"/6af01c54b3e9188ccde7155223633e89/create_issue.webp\" alt=\"create_issue\"></p>\n<h4 id=\"commenting-on-issue\" style=\"position:relative;\"><a href=\"#commenting-on-issue\" aria-label=\"commenting on issue permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Commenting on issue</h4>\n<p>Request type: POST\nAPI endpoint: /repos/{owner}/{repo<em>name}/issues/{issue</em>no}/comments\nRequired data: body</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" -d '{\"body\":\"Test comment\"}' https://api.github.com/repos/devkapilbansal/Github-API-Testing/issues/1/comments</code></p>\n<p><img src=\"/4df61697608dded30f461414e40fe21d/comment_on_issue.webp\" alt=\"comment\"></p>\n<p><strong>Note</strong> - The same endpoint is used for commenting on pull requests too. Just change the issue number with the pull request number.</p>\n<h4 id=\"openingclosing-an-issue\" style=\"position:relative;\"><a href=\"#openingclosing-an-issue\" aria-label=\"openingclosing an issue permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Opening/Closing an issue</h4>\n<p>Request type: PUT\nAPI endpoint: /repos/{owner}/{repo<em>name}/issues/{issue</em>no}</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" -d '{\"state\":\"close\"}' https://api.github.com/repos/devkapilbansal/Github-API-Testing/issues/1</code></p>\n<p><strong>Note</strong> - The same endpoint is valid for updating pull requests too.</p>\n<h4 id=\"results\" style=\"position:relative;\"><a href=\"#results\" aria-label=\"results permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Results</h4>\n<p>The above results can be verified on the GitHub website too.\n<img src=\"/5a6d6e81b8243aeb1415ed6869a974c8/output.webp\" alt=\"results\"></p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>There are a lot more endpoints that you can explore at <a href=\"https://developer.github.com/v3\">Github</a>. Also, you can only do the work you are authorized to with that token.\nAlthough there are plenty of data fields that can be sent with these endpoints, only required ones are shown above.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"November 02, 2020","updated_date":null,"title":"Introduction to Github APIs","tags":["Github","API"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/9b0ec78bfd1a3c9406386c61f5dcb8c4/58556/GitHub_coverImage.webp","srcSet":"/static/9b0ec78bfd1a3c9406386c61f5dcb8c4/61e93/GitHub_coverImage.webp 200w,\n/static/9b0ec78bfd1a3c9406386c61f5dcb8c4/1f5c5/GitHub_coverImage.webp 400w,\n/static/9b0ec78bfd1a3c9406386c61f5dcb8c4/58556/GitHub_coverImage.webp 800w,\n/static/9b0ec78bfd1a3c9406386c61f5dcb8c4/99238/GitHub_coverImage.webp 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Kapil Bansal","github":"devkapilbansal","avatar":null}}}}]}},"pageContext":{"tag":"Github"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}