Starts a CLI-driven flow to link a version control account. Returns a URL to open in a browser to authorize the link, and a session id to poll for completion.
Required permission
Account > Git > General > Manage
Request body
- {object}
vcsService
stringVersion control provider to link. Supported values are `github` and `gitlab`. Defaults to `github`.one ofbitbucket, gitlab, github, self-hosted, azure
Response body
- {object}Response object.
data
{object} requiredResult data.id
string requiredID of the link session, used to poll for completion.
API
CLI
JS Client
POST /v1/integrations/vcs/link-sessions
POST /v1/teams/{teamId}/integrations/vcs/link-sessions
Example request
Request body
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"vcsService":"github"}' \
https://api.northflank.com/v1/integrations/vcs/link-sessionsExample response
200 OK
The link session id and browser authorize URL.
JSON
{
"data": {
"id": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
"authorizeUrl": "https://app.northflank.com/api/integrations/git/state-bridge?linkCode=..."
}
}