Skip to main content
This guide shows you how to register your own OAuth App with GitHub to obtain your OAuth credentials (client id & secret). These are required to let your users grant your app access to their GitHub account. GitHub offers two types of integrations: OAuth Apps and GitHub Apps. This guide covers setting up an OAuth App, which is simpler for basic API access. For more advanced use cases with fine-grained permissions, consider using a GitHub App instead (see our GitHub App setup guide).
1

Create a GitHub account

  1. If you don’t already have a GitHub account, go to GitHub’s signup page and create one.
  2. Sign in to your GitHub account.
2

Register a new OAuth application

  1. Navigate to your GitHub account settings by clicking on your profile photo in the top-right corner and selecting Settings.
  2. In the left sidebar, click on Developer settings.
  3. Select OAuth Apps in the left sidebar.
  4. Click the New OAuth App button.
Note: If this is your first time creating an OAuth app, you’ll see a Register a new application button instead.
3

Configure your OAuth application

Fill in the required fields:
  1. Application name: Enter a name for your application. This will be shown to users during the authorization process.
  2. Homepage URL: Enter the full URL to your application’s homepage.
  3. Application description (optional): Provide a description of your application to help users understand what it does.
  4. Authorization callback URL: Enter https://api.nango.dev/oauth/callback
This is the URL where GitHub will redirect users after they authorize your application.
4

Register the application

  1. Click the Register application button.
  2. Your OAuth application is now registered, and you’ll be taken to its settings page.
5

Generate a client secret

  1. On your OAuth App’s settings page, you’ll see your Client ID displayed at the top.
  2. Click the Generate a new client secret button.
  3. GitHub will generate a client secret for your application. Make sure to copy and store this securely, as you won’t be able to see it again.
Note: Treat your client secret like a password. Never share it publicly or include it in client-side code.
6

Configure your integration in Nango

When setting up your GitHub integration in Nango:
  • Use your Client ID and Client Secret from the previous steps
  • For the authorization URL, use: https://github.com/login/oauth/authorize
  • For the token URL, use: https://github.com/login/oauth/access_token
  • For the scope, select the appropriate permissions your application needs
7

Test the OAuth flow

  1. After configuring your integration in Nango, test the OAuth flow to ensure it works correctly.
  2. The authorization flow will redirect users to GitHub where they can approve access to their account.
  3. After approval, users will be redirected back to your application with an authorization code.
  4. This code will be exchanged for an access token that can be used to make API requests.
8

Next

Follow the Quickstart.
Need help getting started? Get help in the community.
There are certain API methods that only work with an OAuth App that will not work with a GitHub App. Please check the GitHub documentation and look for a “Works with GitHub Apps” header under the endpoint.
For more details on GitHub’s OAuth implementation, see GitHub’s OAuth Apps documentation.