> For the complete documentation index, see [llms.txt](https://docs.samesystem.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samesystem.dev/getting-started/client-tokens.md).

# Client tokens

SameSystem uses identifiers in the request URL to determine which client and sometimes which department the API request relates to.

API v1 and API v2 uses a `clientToken`, which identifies the client and sometimes the department.

### Understanding the Token Format

When logged into SameSystem, the URL contains a context identifier in the following format:

**`c`**`{clientId}`**`d`**`{departmentId}`

For example:

`c1234d54321`

The token consists of two parts:

| Part | Example  | Identifies                    |
| ---- | -------- | ----------------------------- |
| `c`  | `c1234`  | The SameSystem client/company |
| `d`  | `d54321` | The department/shop           |

Both identifiers are unique within SameSystem.

#### Finding Your `clientToken`

The `clientToken` is not available through the API.

You can find it in the URL when logged into SameSystem. It appears immediately after the domain:

`https://in.samesystem.com/c1234d54321/...`

In this example, the `clientToken` is:

`c1234d54321`&#x20;

{% hint style="info" %}
**Important:** Do not assume that all endpoints use the same token format. Refer to the OpenAPI specification to determine whether the endpoint accepts the client part (`c`) only or requires both the client and department parts (`c` + `d`).
{% endhint %}

### Multiple clients

If you have multiple clients and one API user, you will need to login using the clientToken that belongs to the client where your API user is created.


---

# 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://docs.samesystem.dev/getting-started/client-tokens.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.
