---
title: "Connect your app to GitHub API"
description: "<p><a href=\"https://github.com/\">GitHub</a> hosts repositories, issues, pull requests, and CI workflows for engineering teams."
---

> Documentation Index
> Fetch the complete documentation index at: https://rshift.helpcent.re/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your app to GitHub API

<p><a href="https://github.com/">GitHub</a> hosts repositories, issues, pull requests, and CI workflows for engineering teams. The GitHub API connector lets your RShift Sites app call the <a href="https://docs.github.com/en/rest">GitHub REST API</a> from server code. It's designed for apps that read or update GitHub data, such as issue dashboards, PR trackers, and automation workflows.</p>
<p>GitHub is available as two connection types in RShift Sites:</p>
<table>
<thead>
<tr>
<th>Use</th>
<th>If you want to</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>App + chat connector</strong> (this page)</td>
<td>Work with a shared GitHub connection in the project chat and in your published apps</td>
</tr>
<tr>
<td><a href="/sites/integrations/app-user-connectors/">App user connector</a></td>
<td>Let each user of your published app connect their own GitHub account and work with their own repositories, issues, and pull requests</td>
</tr>
</tbody>
</table>
<p>With GitHub, your app can:</p>
<ul>
<li>List and read repositories, branches, and file contents</li>
<li>Create and update issues and pull requests</li>
<li>Read commits, releases, and workflow runs</li>
<li>Build internal tools and automations on top of GitHub data</li>
</ul>
<p>It's a good fit for internal engineering tools, team dashboards, and apps that automate work around your repositories.</p>
<blockquote>
<p><strong>Note</strong></p>
<p>This connector calls the GitHub REST API from apps you build with RShift Sites. Want to export or two-way sync your RShift Sites project's code to a GitHub repository instead? Use <a href="/sites/integrations/github/">GitHub Git sync</a>.</p>
</blockquote>
<h2>Common use cases and example apps</h2>
<p>These examples show what you can build with GitHub, each with a prompt to start from.</p>
<table>
<thead>
<tr>
<th style="text-align: left">Example app</th>
<th style="text-align: left">Example prompt</th>
<th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">Issue triage board</td>
<td style="text-align: left"><em>Use GitHub and build a dashboard that lists open issues across my repositories, grouped by label.</em></td>
<td style="text-align: left"><strong>Surface open work without leaving your app.</strong><br />The app reads issues from GitHub and presents them in a filterable board.</td>
</tr>
<tr>
<td style="text-align: left">PR status hub</td>
<td style="text-align: left"><em>Use GitHub and build a page that shows open pull requests with review status and age.</em></td>
<td style="text-align: left"><strong>Give reviewers a live view of in-flight code review.</strong><br />The app fetches pull requests and highlights stale or blocked reviews.</td>
</tr>
<tr>
<td style="text-align: left">Release tracker</td>
<td style="text-align: left"><em>Use GitHub and build a tool that lists recent releases and workflow results for our main repos.</em></td>
<td style="text-align: left"><strong>Track shipping activity from GitHub data.</strong><br />The app combines release and Actions metadata in one view.</td>
</tr>
<tr>
<td style="text-align: left">Repo health dashboard</td>
<td style="text-align: left"><em>Use GitHub and build an admin page that shows repository stats and open issue counts.</em></td>
<td style="text-align: left"><strong>Monitor repository health at a glance.</strong><br />The app aggregates GitHub API responses into summary cards.</td>
</tr>
<tr>
<td style="text-align: left">Feedback-to-issue form</td>
<td style="text-align: left"><em>Use GitHub and build a feedback form that creates a GitHub issue when someone submits it.</em></td>
<td style="text-align: left"><strong>Turn app events into GitHub issues automatically.</strong><br />The app validates the input and creates the issue through the GitHub REST API.</td>
</tr>
<tr>
<td style="text-align: left">Contributor activity feed</td>
<td style="text-align: left"><em>Use GitHub and build a page that shows recent commits and pull requests across our team repositories.</em></td>
<td style="text-align: left"><strong>Give stakeholders a single view of recent engineering activity.</strong><br />The app fetches commits and pull requests and groups them by repository or author.</td>
</tr>
</tbody>
</table>
<h2>How to connect GitHub API</h2>
<p>Who can create GitHub API connections depends on your plan and workspace settings. App + chat connectors are available by default on Free, Pro, and Business plans. On Enterprise plans, they are effectively disabled at first: <a href="/sites/integrations/admin-controls/#who-can-create-connections-and-clients">Who can create connections and clients</a> defaults to <strong>No one</strong> until an admin changes it in <strong>Connectors → Admin settings → App + chat connectors</strong>.</p>
<p>When adding a connection, you can choose between:</p>
<ul>
<li><strong>GitHub</strong>: sign in with your GitHub account in one click (OAuth)</li>
<li><strong>Use your own credentials</strong>: connect with a personal access token you create in GitHub</li>
</ul>
<p>You can create multiple GitHub API connections using different GitHub accounts or tokens, which is useful for separating environments (for example, development and production) or using different permission scopes.</p>
<p>When the connection is created, you can <a href="/sites/integrations/app-connectors/#link-a-connection-to-a-project">link it to the projects</a> where you want to use it. Anyone building in a project can ask RShift Sites in the project chat to link their project to it.</p>
<h3>Prerequisites</h3>
<p>Before connecting GitHub API, make sure you have:</p>
<ul>
<li>A GitHub account</li>
<li>A <a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens">personal access token</a>, only if you connect with your own credentials instead of signing in with GitHub</li>
<li>Permission to <strong>create connections</strong> in your RShift Sites workspace (see <a href="/sites/integrations/admin-controls/#who-can-create-connections-and-clients">Who can create connections and clients</a>)</li>
</ul>
<blockquote>
<p><strong>Note</strong></p>
<p>All API requests made through this connector count toward your GitHub account <a href="https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api">rate limits</a>. Billing and quota are handled directly by GitHub, not RShift Sites.</p>
</blockquote>
<p>Follow the setup steps below based on how you want to connect GitHub.</p>
<p><strong>Connect with your GitHub account</strong></p>
<p>Choose this option for the fastest setup. You authorize RShift Sites with your GitHub account, and no personal access token is needed. In the connection form, this option is labeled <strong>GitHub</strong>.</p>
<p><strong>Open GitHub API in Connectors</strong></p>
<p>Open <a href="https://lovable.dev/dashboard?connectors"><strong>Connectors</strong></a> and select <strong>GitHub API</strong>. For the other places to open the catalog from, see <a href="/sites/integrations/introduction/#where-to-find-connectors">Where to find connectors</a>.</p>
<pre><code>    The first time you open GitHub API, RShift Sites asks what you want to do. Choose **Use the connector**. The other option, **Sync my code**, sets up [GitHub Git sync](/sites/integrations/github/) instead.
</code></pre>
<p><strong>Add a connection</strong></p>
<p>Click <strong>Add connection</strong> and select <strong>App + chat connector</strong>.</p>
<p><strong>Name the connection</strong></p>
<p>In <strong>Display name</strong>, name the connection (for example, <code>GitHub Prod</code>). This name is only used inside RShift Sites to identify the connection.</p>
<p><strong>Choose GitHub authentication</strong></p>
<p>Under <strong>Authentication</strong>, select <strong>GitHub</strong>. This is the OAuth option.</p>
<p><strong>Review scopes (optional)</strong></p>
<p>Under <strong>Scopes</strong>, review the permissions your app requests. <strong>Read user profile</strong> is always included, and <strong>Repositories</strong> is selected by default.</p>
<pre><code>    | Scope                               | Description                                                                               | Default  |
    | ----------------------------------- | ----------------------------------------------------------------------------------------- | -------- |
    | Read user profile (`read:user`)     | Read the authenticated user's profile data                                                | Required |
    | Repositories (`repo`)               | Full access to public and private repositories, including code, issues, and pull requests | On       |
    | Public repositories (`public_repo`) | Access limited to public repositories                                                     | Off      |
    | Workflows (`workflow`)              | Update GitHub Actions workflow files                                                      | Off      |
    | Gists (`gist`)                      | Create and manage gists                                                                   | Off      |
    | Notifications (`notifications`)     | Access notification marks and threads                                                     | Off      |
    | Email (`user:email`)                | Read the authenticated user's email addresses                                             | Off      |
    | Read organizations (`read:org`)     | Read organization and team membership                                                     | Off      |
    | Projects (`project`)                | Full control of projects                                                                  | Off      |

    For full scope documentation, see [Scopes for OAuth apps](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps).
</code></pre>
<p><strong>Choose who can use this connection</strong></p>
<p>Under <strong>Sharing</strong>, the connection is private to you by default and shows a <strong>Private</strong> label. To share it, click <strong>Share with others</strong>. Then add workspace members by email, or click <strong>Invite entire workspace</strong> to make the connection available to everyone in your RShift Sites workspace.</p>
<pre><code>    See [Who can use connections and clients](/sites/integrations/admin-controls/#who-can-use-connections-and-clients) for more information.
</code></pre>
<p><strong>Connect to GitHub and authorize</strong></p>
<p>Click <strong>Connect</strong>. The GitHub authorization window opens, so make sure your browser doesn't block pop-ups. If it does, RShift Sites redirects you instead.</p>
<pre><code>    Sign in to GitHub if prompted, review the requested permissions, and authorize the app.

    You'll be redirected back to RShift Sites with a confirmation.
</code></pre>
<p><strong>Use your own credentials</strong></p>
<p>Use a personal access token if you want to control the exact token, limit it to specific repositories with a fine-grained token, or manage rotation yourself.</p>
<h3>Step 1: Create a GitHub personal access token</h3>
<pre><code>A personal access token lets your RShift Sites app authenticate with the GitHub REST API as the GitHub account that owns the token.

To create a GitHub personal access token:
</code></pre>
<p><strong>Open GitHub token settings</strong></p>
<p>Sign in to <a href="https://github.com/">GitHub</a> and open <a href="https://github.com/settings/tokens">Settings → Developer settings → Personal access tokens</a>.</p>
<p><strong>Generate a token</strong></p>
<p>Create a <strong>fine-grained</strong> or <strong>classic</strong> token. Give it a descriptive name, for example <code>RShift Sites integration</code>. Fine-grained tokens can be limited to specific repositories. Classic tokens use scope lists such as <code>repo</code> or <code>public_repo</code>.</p>
<p><strong>Select permissions</strong></p>
<p>Grant only the permissions your app needs. For private repositories, include repository read or write access. For public data only, <code>public_repo</code> can be enough on classic tokens.</p>
<p><strong>Copy the token</strong></p>
<p>Copy the token when GitHub shows it and store it securely. GitHub does not show it again.</p>
<blockquote>
<p><strong>Danger</strong></p>
<p>Your personal access token functions like a password. Keep it secure and never share it publicly. You'll need it in the next step.</p>
</blockquote>
<pre><code>See GitHub documentation for more: [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
</code></pre>
<h3>Step 2: Connect GitHub API to RShift Sites</h3>
<pre><code>With your token ready, add the connection in RShift Sites. You can create multiple connections using different personal access tokens.
</code></pre>
<p><strong>Open GitHub API in Connectors</strong></p>
<p>Open <a href="https://lovable.dev/dashboard?connectors"><strong>Connectors</strong></a> and select <strong>GitHub API</strong>. For the other places to open the catalog from, see <a href="/sites/integrations/introduction/#where-to-find-connectors">Where to find connectors</a>.</p>
<pre><code>    The first time you open GitHub API, RShift Sites asks what you want to do. Choose **Use the connector**. The other option, **Sync my code**, sets up [GitHub Git sync](/sites/integrations/github/) instead.
</code></pre>
<p><strong>Add a connection</strong></p>
<p>Click <strong>Add connection</strong> and select <strong>App + chat connector</strong>.</p>
<p><strong>Name the connection</strong></p>
<p>In <strong>Display name</strong>, name the connection (for example, <code>GitHub Prod</code>). This name is only used inside RShift Sites to identify the connection.</p>
<p><strong>Choose your own credentials</strong></p>
<p>Under <strong>Authentication</strong>, select <strong>Use your own credentials</strong>. Then paste the token you created in step 1 in <strong>Personal access token</strong>.</p>
<p><strong>Choose who can use this connection</strong></p>
<p>Under <strong>Sharing</strong>, the connection is private to you by default and shows a <strong>Private</strong> label. To share it, click <strong>Share with others</strong>. Then add workspace members by email, or click <strong>Invite entire workspace</strong> to make the connection available to everyone in your RShift Sites workspace.</p>
<pre><code>    See [Who can use connections and clients](/sites/integrations/admin-controls/#who-can-use-connections-and-clients) for more information.
</code></pre>
<p><strong>Connect</strong></p>
<p>Click <strong>Connect</strong>. RShift Sites verifies the token against the GitHub API before saving the connection.</p>
<p>When connected, anyone building in a project can ask RShift Sites in the project chat to link their project to GitHub API (based on configured connection-level access). Your RShift Sites apps can then read and update repositories, issues, pull requests, and other GitHub resources.</p>
<h2>Limitations</h2>
<p>The GitHub API app + chat connector documented on this page cannot:</p>
<ul>
<li>Replace <a href="/sites/integrations/github/">GitHub Git sync</a> for exporting or syncing your RShift Sites project's codebase</li>
<li>Use GitHub App installation tokens. Connections authenticate as a GitHub account, with an OAuth sign-in or a personal access token.</li>
<li>Call endpoints your granted scopes or token permissions do not cover. If a call returns <code>403</code>, review the OAuth scopes on the connection or the permissions on your personal access token.</li>
<li>Support per-end-user GitHub login. Each connection represents a single GitHub account shared across all projects linked to it. If you need each user of your app to sign in with their own GitHub account, use the GitHub <a href="/sites/integrations/app-user-connectors/">app user connector</a>.</li>
</ul>
<p>If GitHub authorization is revoked from the GitHub side, you'll need to reconnect the integration in RShift Sites before API calls can succeed again. If a personal access token expires or is revoked, update the token on the connection in RShift Sites.</p>
<h2>Manage your {connector_0} connection</h2>
<p>Connections are managed from <a href="https://lovable.dev/dashboard?connectors"><strong>Connectors</strong></a>: select <strong>{connector_0}</strong>, then open the connection.</p>
<ul>
<li><strong>Unlink projects</strong> to remove {connector_0} access from specific projects while keeping the connection available for others. See <a href="/sites/integrations/app-connectors/#unlink-projects-from-a-connection">Unlink projects from a connection</a> for the steps.</li>
<li><strong>Delete the connection</strong> to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use {connector_0} stop working until a new connection is added. See <a href="/sites/integrations/app-connectors/#delete-a-connection">Delete a connection</a> for the steps and who can delete.</li>
</ul>
<h2>Related topics</h2>
<ul>
<li><a href="/sites/integrations/github/">Sync your RShift Sites project with GitHub</a></li>
<li><a href="/sites/integrations/git-sync-overview/">Sync your RShift Sites project code with GitHub, GitLab, or Bitbucket</a></li>
<li><a href="/sites/introduction/support-policy/">Support policy</a></li>
<li><a href="/sites/tips-tricks/external-deployment-hosting/">Deploying and hosting outside RShift Sites</a></li>
<li><a href="/sites/integrations/gitlab-api/">Connect your app to GitLab API</a></li>
</ul>

Source: https://rshift.helpcent.re/sites/integrations/github-api/index.mdx
