> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

> Integrate your application with the GitHub API

## 🚀 Quickstart

Connect to GitHub with Nango and see data flow in 2 minutes.

<Steps>
  <Step title="Create the integration">
    In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *GitHub*.
  </Step>

  <Step title="Authorize GitHub">
    Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then log in to GitHub. Later, you'll let your users do the same directly from your app.
  </Step>

  <Step title="Call the GitHub API">
    Let's make your first request to the GitHub API. Replace the placeholders below with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl "https://api.nango.dev/proxy/repos" \
          -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
          -H "Provider-Config-Key: <INTEGRATION-ID>" \
          -H "Connection-Id: <CONNECTION-ID>"
        ```
      </Tab>

      <Tab title="Node">
        Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

        ```typescript theme={null}
        import { Nango } from '@nangohq/node';

        const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

        const res = await nango.get({
            endpoint: '/repos',
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

        console.log(res.data);
        ```
      </Tab>
    </Tabs>

    Or fetch credentials with the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.
  </Step>

  <Step title="Implement Nango in your app">
    Follow our [Auth implementation guide](/guides/primitives/auth) to integrate Nango in your app.

    To obtain your own production credentials, follow the setup guide linked below.
  </Step>
</Steps>

## 📚 GitHub Integration Guides

Nango maintained guides for common use cases.

* [How to register your own GitHub OAuth app](/api-integrations/github/how-to-register-your-own-github-api-oauth-app)\
  Register an OAuth app with GitHub and obtain credentials to connect it to Nango

* [How to set up a GitHub App with Nango](/api-integrations/github/how-to-set-up-a-github-app-with-nango)\
  Learn the differences between GitHub Apps and OAuth Apps, and how to configure a GitHub App in Nango

Official docs: [GitHub REST API Documentation](https://docs.github.com/en/rest)

## 🧩 Pre-built syncs & actions for GitHub

Enable them in your dashboard. Extend and customize to fit your needs.

### Files

| Function name | Description                                                  | Type                                           | Source code                                                                                                     |
| ------------- | ------------------------------------------------------------ | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `list-files`  | Lists all the files of a Github repo given a specific branch | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/github/syncs/list-files.ts) |

### Others

| Function name      | Description                                                                                          | Type                                           | Source code                                                                                                           |
| ------------------ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `commits`          | Sync commits for repositories and branches in scope                                                  | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/github/syncs/commits.ts)          |
| `issues`           | Sync issues for one or more GitHub repositories with incremental updates based on issue activity     | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/github/syncs/issues.ts)           |
| `pull-requests`    | Sync pull requests for one or more GitHub repositories, including status, branches, and merge state. | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/github/syncs/pull-requests.ts)    |
| `releases`         | Sync releases for one or more GitHub repositories.                                                   | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/github/syncs/releases.ts)         |
| `repositories`     | Sync repositories visible to the authenticated GitHub user or installation.                          | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/github/syncs/repositories.ts)     |
| `repository-files` | Sync file metadata for a specific repository branch using the Git trees API recursively              | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/github/syncs/repository-files.ts) |
| `workflow-runs`    | Sync GitHub Actions workflow runs for one or more repositories.                                      | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/github/syncs/workflow-runs.ts)    |

***
