> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/reference/authentication/authentication.md).

# Authentication

How authentication works on Roboflow, from private API keys and the publishable key to OAuth.

Every request to the Roboflow API and to Roboflow Inference is authenticated. This section explains the credential types Roboflow offers, when to use each, and where to find the IDs your requests need.

{% hint style="info" icon="key" %}
Find your API key at [app.roboflow.com/settings/api](https://app.roboflow.com/settings/api).
{% endhint %}

## Credential types

Roboflow supports several kinds of credentials, each suited to a different context:

* Private API key: the workspace credential. By default it grants full access to your workspace's data, models, and projects, so treat it like a password and keep it server-side. Use it for the [REST API](https://docs.roboflow.com/reference/platform/rest-api.md), [Python SDK](https://docs.roboflow.com/reference/platform/python-sdk.md), [CLI](https://docs.roboflow.com/reference/platform/cli.md), and self-hosted [Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted). With [Advanced API Keys](https://docs.roboflow.com/reference/authentication/authentication/scoped-api-keys.md) a private key can be limited to specific abilities and folders. See [Find Your Roboflow API Key](https://docs.roboflow.com/reference/authentication/authentication/find-your-roboflow-api-key.md).
* Publishable key: a non-secret credential of the form `rf_<workspaceId>`, safe to embed in browser or edge code such as [inferencejs](https://docs.roboflow.com/deployment/self-hosted/sdks/web-browser). It is inference- and model-download-only and cannot be rotated or revoked because it is derived from the workspace ID. See [The Publishable Key](https://docs.roboflow.com/reference/authentication/authentication/manage-api-keys.md#the-publishable-key).
* OAuth 2.1 (Sign in with Roboflow): let users sign in to your application with their Roboflow account and grant your app scoped access on their behalf, using the authorization-code flow with PKCE. See [Sign In With Roboflow (Getting Started)](https://docs.roboflow.com/reference/authentication/authentication/sign-in-with-roboflow-getting-started.md).

## Managing keys

* [Find Your Roboflow API Key](https://docs.roboflow.com/reference/authentication/authentication/find-your-roboflow-api-key.md): where your key lives, private vs. publishable, and how to pass it to Inference.
* [Manage API Keys in the Dashboard](https://docs.roboflow.com/reference/authentication/authentication/manage-api-keys-in-the-dashboard.md): create, rename, roll, protect, disable, and revoke keys from Settings, and read the badges and warnings on the key table.
* [Rotate API Keys](https://docs.roboflow.com/reference/authentication/authentication/rotate-api-keys.md): when to rotate, how to find where a key is used first, and how rotation reminders work.
* [Advanced API Keys](https://docs.roboflow.com/reference/authentication/authentication/scoped-api-keys.md): scoped permissions, folder keys, custom metadata, disabling, a default key, and rotation reminders (Enterprise add-on).
* [API Key Management API](https://docs.roboflow.com/reference/authentication/authentication/manage-api-keys.md): the same operations via the REST API, the `roboflow api-key` CLI, or the MCP server.

## Sign in with Roboflow (OAuth)

* [Sign In With Roboflow (Getting Started)](https://docs.roboflow.com/reference/authentication/authentication/sign-in-with-roboflow-getting-started.md) - register an OAuth app, run the PKCE flow, exchange and refresh tokens, and the full list of scopes.
* [Sign In With Roboflow (Developer Reference)](https://docs.roboflow.com/reference/authentication/authentication/sign-in-with-roboflow-developer-reference.md) - endpoints, hosts, visibility, token endpoint authentication, errors, and a runnable example app.
* [OAuth 2.1 (Sign in with Roboflow)](https://docs.roboflow.com/reference/authentication/authentication/oauth.md) - legacy landing page that points to the two guides above.

## Finding your IDs

Most API calls need more than a key - they need to know which workspace, project, and model version to act on.

* [Workspace and Project IDs](https://docs.roboflow.com/reference/authentication/authentication/workspace-and-project-ids.md) - retrieve the project ID and model version number used in inference and API requests.

For the header and query-parameter formats accepted on each host, see [Authenticate with the REST API](https://docs.roboflow.com/reference/platform/rest-api/authenticate-with-the-rest-api.md).
