GitHub Integration
GitHub Connection Status
Check whether your GitHub account is connected and verify that your stored token is valid.
GET
This endpoint validates the stored GitHub token by calling the GitHub API and returns the connected account’s profile information. Use this to confirm your GitHub integration is active before creating tasks that work with repositories.
This endpoint requires a Pro subscription. Ensure your BLACKBOX account is on the Pro plan before calling GitHub integration endpoints.
Authentication
To use this API, you need a BLACKBOX API Key. Follow these steps to get your API key:- Go to app.blackbox.ai/agent-api and click Get an API Key (requires a Pro subscription)
- Once provisioning completes, you will be redirected to your Dashboard
- From the Dashboard, create an API key to use with all Agent API requests
sk-xxxxxxxxxxxxxxxxxxxxxx
Headers
API Key of the form
Bearer <api_key>.Example: Bearer sk_b41b647ffbfed27f616560Response Fields
Connected
true when a valid GitHub token is stored.GitHub username of the connected account.
Display name of the GitHub user.
Primary email address of the GitHub user (if public).
URL of the GitHub user’s avatar image.
Comma-separated list of OAuth scopes granted by the token (e.g.
"repo,user").Number of public repositories owned by the user.
Number of private repositories owned by the user.
Whether the stored token successfully authenticated with GitHub.
Not Connected
false when no token is stored or the token is invalid.Human-readable explanation (e.g.
"No GitHub token found").Error Codes
| Status Code | Error | Description |
|---|---|---|
| 200 | Success | Status returned (connected or not) |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Pro subscription required |
| 500 | Internal Server Error | Failed to validate token |