Github Connection Status
curl --request GET \
--url https://api.example.com/api/github/statusimport requests
url = "https://api.example.com/api/github/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/github/status', 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/github/status",
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/github/status"
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/github/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/github/status")
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{
"connected": true,
"account_login": "<string>",
"account_type": "<string>",
"installation_id": 123,
"needs_reconnect": false,
"reason": "<string>"
}GitHub
Github Connection Status
Check if user has connected GitHub.
connected reflects the same working-token condition the capability
endpoints (/installations, /repositories, /branches) gate on —
not merely whether an installation record exists. A stored
installation_id with a dead token (decrypt failure, refresh failure,
App suspend) reports connected=False + needs_reconnect=True instead
of a phantom “connected” that 400s everywhere else. Expired tokens
self-heal here via the shared refresh path.
GET
/
api
/
github
/
status
Github Connection Status
curl --request GET \
--url https://api.example.com/api/github/statusimport requests
url = "https://api.example.com/api/github/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/github/status', 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/github/status",
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/github/status"
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/github/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/github/status")
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{
"connected": true,
"account_login": "<string>",
"account_type": "<string>",
"installation_id": 123,
"needs_reconnect": false,
"reason": "<string>"
}