Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 2.96 KB

File metadata and controls

58 lines (44 loc) · 2.96 KB
title Authenticating to Kosli
description How to get an API token for the Kosli CLI and API, and where to manage credentials.
icon key

Most interactions with Kosli — from the CLI, the API, or CI/CD pipelines — require an API token. This page covers the quickest path to getting one and points to the deeper documentation for each topic.

Pick a credential type

Use case Credential Where to manage it
CI/CD, runtime reporters, automation Service account API key (recommended) Service accounts
Interactive scripts tied to your user Personal API key Personal API keys
For anything automated, use a service account. Personal API keys inherit your user's permissions across every organization you belong to, which is rarely what you want for a pipeline.

Quick start: get a token

Open the Kosli web app and sign in:
- EU: [app.kosli.com](https://app.kosli.com)
- US: [app.us.kosli.com](https://app.us.kosli.com)

Depending on how your organization is set up, you'll sign in with single sign-on, [Magic Link](/administration/authentication/magic_link) or [GitHub](/administration/authentication/github_login).
- **For CI/CD**, follow [Service accounts](/administration/authentication/service_accounts) to create a service account and generate its first API key. - **For your own scripts**, follow [Personal API keys](/user/personal_api_keys) to generate a key tied to your user. Kosli stores only a hash of the token, so the original is shown once and cannot be retrieved later. Paste it straight into your secret store.

Use the token

Pass the token as a bearer token when calling the API directly:

curl -H "Authorization: Bearer <<your-api-key>>" \
  https://app.kosli.com/api/v2/environments/<<your-org-name>>

For CLI usage, basic auth, and full examples, see API authentication methods.

See also