curl "https://app.runtm.com/api/github-app/token-for-repo?repo_owner=acme-corp" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123"
import requests
resp = requests.get(
"https://app.runtm.com/api/github-app/token-for-repo",
params={"repo_owner": "acme-corp"},
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
)
print(resp.json())
const resp = await fetch(
"https://app.runtm.com/api/github-app/token-for-repo?repo_owner=acme-corp",
{
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
}
);
const data = await resp.json();
{
"access_token": "ghs_xxxxxxxxxxxxxxxxxxxx",
"expires_at": "2026-05-09T19:00:00Z"
}
GitHub App
Token for Repo
Get an installation access token scoped to a specific repo owner.
GET
/
api
/
github-app
/
token-for-repo
curl "https://app.runtm.com/api/github-app/token-for-repo?repo_owner=acme-corp" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123"
import requests
resp = requests.get(
"https://app.runtm.com/api/github-app/token-for-repo",
params={"repo_owner": "acme-corp"},
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
)
print(resp.json())
const resp = await fetch(
"https://app.runtm.com/api/github-app/token-for-repo?repo_owner=acme-corp",
{
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
}
);
const data = await resp.json();
{
"access_token": "ghs_xxxxxxxxxxxxxxxxxxxx",
"expires_at": "2026-05-09T19:00:00Z"
}
Finds the GitHub App installation that has access to repos owned by the specified user or organization, and returns its access token. Searches org-shared installations first, then personal ones.
Required scope:
integrations:read
string
required
GitHub username or organization that owns the repository.
string
Optional. Check org-shared installations first.
string
required
GitHub App installation access token.
string
required
ISO 8601 token expiry timestamp.
curl "https://app.runtm.com/api/github-app/token-for-repo?repo_owner=acme-corp" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123"
import requests
resp = requests.get(
"https://app.runtm.com/api/github-app/token-for-repo",
params={"repo_owner": "acme-corp"},
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
)
print(resp.json())
const resp = await fetch(
"https://app.runtm.com/api/github-app/token-for-repo?repo_owner=acme-corp",
{
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
},
}
);
const data = await resp.json();
{
"access_token": "ghs_xxxxxxxxxxxxxxxxxxxx",
"expires_at": "2026-05-09T19:00:00Z"
}