> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/ai-workbench-qore/control-center/admin/service-accounts.md). Agents can also search and read this documentation through its [MCP server](https://docs.uptiq.ai/~gitbook/mcp).

# Service accounts

Give a server or script its own identity to call the platform.

A service account is a non-human identity. A server or script signs in as the service account with a key file, instead of using a user's login or an API key. Open **Admin → Service Accounts** to create and manage them. Service accounts apply to the whole account.

A service account holds capabilities, as an API key does, but fewer. Grant only the capabilities that the server or script needs. See [What a service account can hold](#what-a-service-account-can-hold).

Unlike an API key, a service account doesn't use a secret that you paste. It signs in with a key file that holds a private key.

## Create a service account

1. Select **Create Service Account**.
2. Enter the account's **Name**, such as *CI bot*.
3. Under **Capabilities**, use the search box, or expand a group and check each capability the account needs.
4. Select **Create**.

| Field            | Description                                                                      | Required |
| ---------------- | -------------------------------------------------------------------------------- | -------- |
| **Name**         | A label for the account, such as *CI bot*.                                       | Yes      |
| **Capabilities** | The capabilities the account's server or script needs. Check only what it needs. | Yes      |

After you select **Create**, Qore offers to create a key: "Create its key now, or cancel and add one later from its page." Set **Expires on**, or leave it empty for a key that never expires. Then select **Create Key**. To skip the key, select **Cancel**, and Qore creates no key.

The new account appears in the list as **Active**, with its **Client ID** and a capability count, such as *1 capability*. Until you create an account, the list is empty.

## What a service account can hold

A service account can hold the same capabilities as an [API key](https://docs.uptiq.ai/ai-workbench-qore/control-center/admin/api-keys.md), except the eleven capabilities below, which build or import things.

| Area              | Capabilities not available to a service account            |
| ----------------- | ---------------------------------------------------------- |
| Apps              | Build an app, build an app headlessly, import an app       |
| Agents            | Build an agent, build an agent headlessly, import an agent |
| Data sources      | Build a data source                                        |
| Knowledge Content | Build knowledge, import knowledge                          |
| Flows             | Build a flow                                               |
| Design System     | Manage design systems                                      |

So the **Apps**, **Agents**, **Knowledge Content**, **Flows**, and **Design System** groups have fewer capabilities here than in **Create API Key**.

## Manage a service account

Open a row's ⋯ menu to view, edit, disable, or delete the account.

| Action      | What it does                                                                                                                   |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **View**    | Opens the account's page. The page lists the **Client ID**, **Status**, and **Created** date, and a **Capabilities** dropdown. |
| **Edit**    | Changes the account's settings.                                                                                                |
| **Disable** | Stops the account from signing in without deleting it.                                                                         |
| **Delete**  | Removes the account and its keys.                                                                                              |

Under **Keys** on the account's page, review each key's **Key ID**, **Status**, **Expires**, and **Created** date. Select **Create Key** to add another key.

**Disable** stops the account from signing in without deleting it. Keys that are inactive, expired, or deleted can't sign in. A service account that is inactive, or that sits in a deactivated account, can't sign in either.

**Delete** removes the account and its keys. Qore asks "Delete service account?" and warns, "Its keys are deleted too, and anything using them stops working. This cannot be undone." Select **Delete** to confirm.

## How a key signs in

A key file holds a private key. The caller signs a short-lived assertion with that key, then exchanges the assertion for an access token. This follows the OAuth JWT-bearer grant. Qore checks each of the following conditions and refuses the sign-in if any check fails, with a 401 error.

| Check  | Requirement                                                                                                                |
| ------ | -------------------------------------------------------------------------------------------------------------------------- |
| Claims | The assertion names the service account as both issuer and subject, and has an issued-at time, an expiry, and a unique ID. |
| Age    | The assertion is at most 5 minutes old, with 60 seconds of clock tolerance.                                                |
| Reuse  | Qore refuses an assertion that was already used, so a replayed assertion fails.                                            |
| Status | The key is active and not expired, and the service account is active.                                                      |

{% hint style="warning" %}
Treat a key file like a password. Keep it on a server, never in a browser or a code repository. Delete the key from the account's page when it's no longer needed.
{% endhint %}

### Sign in from Node

In Node, pass the parsed key file to the SDK as `serviceAccountKey`, with the `projectId` to work in:

```ts
const client = new AgentClient({
    serviceAccountKey: JSON.parse(fs.readFileSync('service-account-key.json', 'utf8')),
    projectId: 'my-project',
    baseUrl: 'https://api.example.com'
});
```

The SDK gets its own access token and renews it 60 seconds before it expires. If the service account or its key is turned off or deleted, the renewal fails, and the SDK raises `AuthenticationError`. See [The Agent Development SDK](https://docs.uptiq.ai/ai-workbench-qore/platform-resources/the-agent-development-sdk.md).

## What's next

* [API keys](https://docs.uptiq.ai/ai-workbench-qore/control-center/admin/api-keys.md). Programmatic credentials for integrations.
* [Roles](https://docs.uptiq.ai/ai-workbench-qore/control-center/admin/roles.md). What each role permits.
* [The Agent Development SDK](https://docs.uptiq.ai/ai-workbench-qore/platform-resources/the-agent-development-sdk.md). Call agents from your own code.


---

# 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.uptiq.ai/ai-workbench-qore/control-center/admin/service-accounts.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.
