---
title: "Exchange GitLab CI oidc token"
method: POST
path: "/auth/gitlab-oidc"
tags: ["gitlab"]
---

# Exchange GitLab CI oidc token

`POST /auth/gitlab-oidc`

## Request

- Base URL: `https://api.faable.com`
- URL: `https://api.faable.com/auth/gitlab-oidc`
- Auth: none declared

Exchange a GitLab CI id_token for a Faable token scoped to one app

## Request body

- object
  - `token` string, required
  - `app_id` string, required: The app to deploy (`faable deploy --app`). Required: GitLab has no linked repository to infer it from.

## Response `200`

Default Response

## Other responses

- `400`: `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
- `401`: `oidc_untrusted` — The CI OIDC token (GitHub Actions or GitLab CI) was rejected. `message` says why.
- `403`: `app_ci_untrusted` — The app does not exist or does not trust the GitLab project the token comes from (`faable deploy apps set --gitlab-project <id>`).
- `429`: `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.
- `500`: `internal_error` — Unexpected server error. Retry later; the request id is logged.
- `503`: `database_unavailable` — Faable cannot reach its database right now. Transient: retry after the `Retry-After` header.

---

[API](https://skmtc.dev/faable/apis/faablecloud-api.md) · [All operations](https://skmtc.dev/faable/apis/faablecloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/faable/apis/faablecloud-api/revisions/e2fc93da3c49?raw)
