DocsAF OAuth
GitHub OAuth flow with repository access
Start DocsAF GitHub OAuth flow
GET
/docsaf/oauth/startInitiates GitHub OAuth flow with repository access scopes. Redirects user to GitHub authorization page with repo and webhook permissions.
Optional repo_url parameter can pre-fill the repository for project creation.
Authentication required: bearerAuth
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
repo_url | string | query | No | Optional GitHub repository URL to pre-fill |
Code Examples
curl -X GET "https://searchaf.antfly.io/api/v1/docsaf/oauth/start?repo_url=https://github.com/antflydb/colony" \\
-H "Authorization: Bearer YOUR_API_KEY"Responses
{
"redirect_url": "string"
}Handle GitHub OAuth callback
GET
/docsaf/oauth/callbackProcesses GitHub OAuth callback after user authorizes. Stores the access token temporarily in user_docsaf_tokens table. Redirects to frontend with success status.
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
code | string | query | Yes | Authorization code from GitHub |
state | string | query | Yes | State parameter for CSRF protection |
Code Examples
curl -X GET "https://searchaf.antfly.io/api/v1/docsaf/oauth/callback?code=value&state=value" \\
-H "Authorization: Bearer YOUR_API_KEY"Responses
{
"success": true
}