Skip to content

completeGitHubAppRegistration

Completes the GitHub App registration (step 2 of the 3-step flow). After calling startGitHubAppSetup (step 1) and the user creates the app on GitHub using the manifest, GitHub returns a setup code. Pass this code along with the session ID from step 1 to exchange it for app credentials. Returns the installation URL where the user should install the app on their GitHub organization.

Arguments

Argument Type Description
input (required) CompleteGitHubAppRegistrationInput! Input for completing GitHub App registration.

Returns

CompleteGitHubAppRegistrationReply!

Sample

mutation CompleteGitHubAppRegistration($input: CompleteGitHubAppRegistrationInput!) {
  completeGitHubAppRegistration(input: $input) {
    installationUrl
  }
}
{
  "input": {
    "sessionId": "example-string",
    "setupCode": "example-string"
  }
}
{
  "data": {
    "completeGitHubAppRegistration": {
      "installationUrl": "example-string"
    }
  }
}