This version of GitHub Enterprise was discontinued on 2021-09-23. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Creating a GitHub App from a manifest

A GitHub App Manifest is a preconfigured GitHub App you can share with anyone who wants to use your app in their personal repositories. The manifest flow allows someone to quickly create, install, and start extending a GitHub App without needing to register the app or connect the registration to the hosted app code.

About GitHub App Manifests

When someone creates a GitHub App from a manifest, they only need to follow a URL and name the app. The manifest includes the permissions, events, and webhook URL needed to automatically register the app. The manifest flow creates the GitHub App registration and retrieves the app's webhook secret, private key (PEM file), and GitHub App ID. The person who creates the app from the manifest will own the app and can choose to edit the app's configuration settings, delete it, or transfer it to another person on GitHub.

You can use Probot to get started with GitHub App Manifests or see an example implementation. See "Using Probot to implement the GitHub App Manifest flow" to learn more.

Here are some scenarios where you might use GitHub App Manifests to create preconfigured apps:

  • Help new team members come up-to-speed quickly when developing GitHub Apps.
  • Allow others to extend a GitHub App using the GitHub APIs without requiring them to configure an app.
  • Create GitHub App reference designs to share with the GitHub community.
  • Ensure you deploy GitHub Apps to development and production environments using the same configuration.
  • Track revisions to a GitHub App configuration.

Implementing the GitHub App Manifest flow

The GitHub App Manifest flow uses a handshaking process similar to the OAuth flow. The flow uses a manifest to register a GitHub App and receives a temporary code used to retrieve the app's private key, webhook secret, and ID.

Note: You must complete all three steps in the GitHub App Manifest flow within one hour.

Follow these steps to implement the GitHub App Manifest flow:

  1. You redirect people to GitHub to create a new GitHub App.
  2. GitHub redirects people back to your site.
  3. You exchange the temporary code to retrieve the app configuration.

1. You redirect people to GitHub to create a new GitHub App

To redirect people to create a new GitHub App, provide a link for them to click that sends a POST request to https://github.com/settings/apps/new for a user account or https://github.com/organizations/ORGANIZATION/settings/apps/new for an organization account, replacing ORGANIZATION with the name of the organization account where the app will be created.

You must include the GitHub App Manifest parameters as a JSON-encoded string in a parameter called manifest. You can also include a state parameter for additional security.

The person creating the app will be redirected to a GitHub page with an input field where they can edit the name of the app you included in the manifest parameter. If you do not include a name in the manifest, they can set their own name for the app in this field.

Create a GitHub App Manifest

GitHub App Manifest parameters

NameTypeDescription
namestringThe name of the GitHub App.
urlstringRequired. The homepage of your GitHub App.
hook_attributesobjectThe configuration of the GitHub App's webhook.
redirect_urlstringThe full URL to redirect to after a user initiates the creation of a GitHub App from a manifest.
callback_urlstringA full URL to redirect to after someone authorizes an installation.
descriptionstringA description of the GitHub App.
publicbooleanSet to true when your GitHub App is available to the public or false when it is only accessible to the owner of the app.
default_eventsarrayThe list of events the GitHub App subscribes to.
default_permissionsobjectThe set of permissions needed by the GitHub App. The format of the object uses the permission name for the key (for example, issues) and the access type for the value (for example, write).

The hook_attributes object has the following key:

NameTypeDescription
urlstringRequired. The URL of the server that will receive the webhook POST requests.
activebooleanDeliver event details when this hook is triggered, defaults to true.