Manual
CLI
API
Log in Get started free

Connect GitLab

Finishes connecting a GitLab account: GitLab sends the browser back with a code and the state you got from the overview.

Finishes connecting a GitLab account: GitLab sends the browser back with a code and the state you got from the overview.

HTTP
POST /integrations/gitlab/connections

Access: Session token only. API keys get 403 with insufficient_scope.

Role: Organisation owner or admin.

Request body #

JSON.

FieldTypeRequiredDescription
codestringyesThe code GitLab sent back to the browser.
statestringyesThe state from connectUrl.
JSON
{ "code": "...", "state": "..." }

Response 200 #

The overview after connecting, as in GitLab overview.

Errors #

StatuserrorWhen
401unauthenticatedThe token is missing or not valid.
403forbiddenYou are not an owner or admin.
503gitlab_not_configuredThe GitLab integration is not set up on this server.
400invalid_statestate is not the one the overview gave you, or was made by someone else.
502gitlab_errorGitLab refused the request. message says why.
429rate_limitedToo many requests, see Rate limiting.

See Errors for the error format.