Skip to main content
Мы публикуем частые обновления нашей документации, и перевод этой страницы может все еще выполняться. Актуальные сведения см. в документации на английском языке.

Создание приложения OAuth

Вы можете создать и зарегистрировать приложение OAuth в личной учетной записи или в любой организации, к которым у вас есть административный доступ. Создавая приложение OAuth, не забывайте защищать конфиденциальность, используя только информацию, которую вы считаете общедоступной.

Note: Consider building a GitHub App instead of an OAuth App.

Both OAuth Apps and GitHub Apps use OAuth 2.0.

OAuth Apps can only act on behalf of a user while GitHub Apps can either act on behalf of a user or independently of a user.

GitHub Apps use fine-grained permissions, give the user more control over which repositories the app can access, and use short-lived tokens.

For more information, see "Differences between GitHub Apps and OAuth Apps" and "About creating GitHub Apps."

Note: A user or organization can own up to 100 OAuth apps.

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Screenshot of GitHub's account menu showing options for users to view and edit their profile, content, and settings. The menu item "Settings" is outlined in dark orange.

  2. In the left sidebar, click Developer settings.

  3. In the left sidebar, click OAuth Apps.

  4. Click New OAuth App.

    Note: If you haven't created an app before, this button will say, Register a new application.

  5. In "Application name", type the name of your app.

    Warning: Only use information in your OAuth app that you consider public. Avoid using sensitive data, such as internal URLs, when creating an OAuth App.

  6. In "Homepage URL", type the full URL to your app's website.

  7. Optionally, in "Application description", type a description of your app that users will see.

  8. In "Authorization callback URL", type the callback URL of your app.

    Note: OAuth Apps cannot have multiple callback URLs, unlike GitHub Apps.

  9. If your OAuth App will use the device flow to identify and authorize users, click Enable Device Flow. For more information about the device flow, see "Authorizing OAuth Apps."

  10. Click Register application.

Further reading