Skip to main content
GET
/
api
/
v0
/
companies
/
github
/
installation-callback
Endpoint called by GitHub post-installation.
curl --request GET \
  --url https://api.example.com/api/v0/companies/github/installation-callback
import requests

url = "https://api.example.com/api/v0/companies/github/installation-callback"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/api/v0/companies/github/installation-callback', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.example.com/api/v0/companies/github/installation-callback",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/api/v0/companies/github/installation-callback"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/api/v0/companies/github/installation-callback")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v0/companies/github/installation-callback")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "msg": "<string>"
}
{
  "msg": "<string>"
}
{
  "msg": "<string>"
}
{
  "msg": "<string>"
}
{
  "msg": "<string>"
}

Query Parameters

installation_id
integer<int64> | null

The installation id, unique to an installation of the GitHub app. Present for install, absent for request.

Required range: x >= 0
code
string | null

The code to create a user access token. May be absent for request.

setup_action
string
required

The type of callback. Either "install" or "request".

state
string | null

The CSRF state that was set at the start of the installation. Absent when the org admin approves a requested installation (they never went through our installation link flow).

Response

GitHub app installed or installation pending approval