> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/references/interfaces/apis/data-product-apis/getting-started/authentication.md).

# Authentication & authorization

Secure Data Product API calls with DataOS tokens, identity checks, and access controls.

Every Data Product API request requires a DataOS access token:

```http
Authorization: Bearer <dataos-access-token>
```

No other authentication scheme is supported.

## Authentication proves identity

The token identifies the DataOS user making the request.

```bash
curl "$BASE_URL/metadata/semantic" \
  --header "Authorization: Bearer $TOKEN"
```

* `401 Unauthorized` means the token is missing, malformed, invalid, or expired.
* Never place tokens in URLs, source code, screenshots, or version control.
* Store tokens in environment variables or a secrets manager and rotate suspected exposures.

## Authorization controls access

The API evaluates the permissions of the identity behind the token. Access depends on the Data Product, tenant, semantic policies, and resource ownership.

* `403 Forbidden` means the identity is valid but cannot perform the operation.
* Semantic queries return only public members and apply the Data Product's query policies.
* Private perspectives are visible to their owner and explicitly allowed users; only the owner can update or delete them.
* User identity is derived from authentication. Do not send an `X-User` header yourself.

{% hint style="info" %}
Authentication answers "who is calling?" Authorization answers "what may this identity read or change?" A valid token can still receive `403` for a protected resource.
{% endhint %}

## SDK and Postman

Pass the token once when constructing a [Python or TypeScript client](https://v2.dataos.info/references/interfaces/apis/data-product-apis/sdks.md); the SDK attaches it to requests. In the generated Postman collection, set the `apikey` collection variable and keep collection-level Bearer authentication enabled.

## Next step

Continue to [API calls](https://v2.dataos.info/references/interfaces/apis/data-product-apis/getting-started/api-calls.md) to build the base URL and send your first request.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/references/interfaces/apis/data-product-apis/getting-started/authentication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
