curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/github/organizations \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/organizations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/github/organizations', 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://app.base44.com/api/apps/{app_id}/github/organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.base44.com/api/apps/{app_id}/github/organizations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/github/organizations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/github/organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 1024547,
"login": "base44",
"avatar_url": "https://avatars.githubusercontent.com/u/1024547?v=4",
"installation_id": "58231904",
"type": "Organization",
"repository_selection": "all",
"missing_pr_automation_permissions": [
"<string>"
],
"missing_pr_automation_events": [
"<string>"
]
}
]List GitHub organizations
Lists the GitHub accounts you can create the app’s repository in. Your personal account comes first, then your organizations alphabetically.
Only accounts with the Base44 GitHub App installed appear, so install it on the account you want before you call this. Your own GitHub account also has to be connected to Base44, which you do in the Base44 online app editor rather than through this API.
When the app’s workspace limits GitHub repositories to approved organizations, this returns only the approved ones, and otherwise it returns all of them. Call Get GitHub organization policy to see whether that limit is on.
If you’re a workspace owner or admin, this list is filtered by the limit even though you aren’t bound by it, so it can leave out an organization you’re allowed to connect under.
curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/github/organizations \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/organizations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/github/organizations', 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://app.base44.com/api/apps/{app_id}/github/organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.base44.com/api/apps/{app_id}/github/organizations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/github/organizations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/github/organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 1024547,
"login": "base44",
"avatar_url": "https://avatars.githubusercontent.com/u/1024547?v=4",
"installation_id": "58231904",
"type": "Organization",
"repository_selection": "all",
"missing_pr_automation_permissions": [
"<string>"
],
"missing_pr_automation_events": [
"<string>"
]
}
]Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Path Parameters
ID of the app whose workspace decides which GitHub organizations you can use.
Response
The GitHub accounts you can create the app's repository in.
GitHub's numeric ID for the account.
1024547
GitHub username or organization name. Pass it as org_name to Connect a GitHub repository.
"base44"
URL of the account's GitHub profile picture.
"https://avatars.githubusercontent.com/u/1024547?v=4"
ID of the Base44 GitHub App installation on this account. Pass it as installation_id to Connect a GitHub repository.
"58231904"
Either User for your personal account or Organization for an organization.
User, Organization "Organization"
Whether the Base44 GitHub App can reach all repositories in this account or only chosen ones. Either all or selected. You can't create a new repository under an account set to selected, so switch that account to all repositories in GitHub first, under Settings > Applications > Base44 > Repository access.
all, selected "all"
GitHub App permissions required for PR automation but not granted.
GitHub App webhook subscriptions required for PR automation but absent.
Was this page helpful?