> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/connections-and-tool-execution/api-keys-service-accounts-and-certificate-credentials.md).

# API Keys, Service Accounts, and Certificate Credentials

Some connectors use an API key, service account, or certificate instead of interactive sign-in. Use the credential type shown by the selected connector.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FDYeUgXiSD5dUMZZuj7gB%2FG048.mp4?alt=media&token=212157c5-1553-4d11-bbc0-6f8e9b366895>" %}

## Before you begin

Permission to create the credential in the provider and add a connection in StackAI.

## Credential types

| Term                   | Definition                                                                                                                                                                                    |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| API key                | A secret credential accepted by a supported API or connector. Send it only through the documented authentication field or header.                                                             |
| Service account        | An account used for application access rather than an individual’s interactive session. Grant access to the intended provider resources and follow that provider’s setup requirements.        |
| Certificate credential | Authentication material that uses a certificate and, where required, its corresponding private key. Preserve the requested format; a certificate and its private key are not interchangeable. |
| PEM                    | A text format used for some certificates and keys, with boundary lines around encoded data. Keep its headers, footers, and line breaks when the connector requires PEM.                       |
| Secret                 | Sensitive configuration such as a credential. Use supported secret fields and avoid exposing values in prompts, logs, or screenshots.                                                         |

## Configure provider credentials

1. Open the provider’s integration page and select a supported authentication method.

![Check the selected connector’s credential fields and application settings.](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/uLInoJ22GKYfoevFrcSN/assets/g048-g048-02-config.png)

Check the selected connector’s credential fields and application settings.

2. Create the credential in the provider with the required resource access.
3. Enter each value in its matching StackAI connection field and save. Confirm access with a read operation.

The saved connection can access the intended provider resources.

## Behavior and limitations

An API key, client secret, certificate, and private key are different credential types. Preserve required PEM headers and line breaks. Do not paste secrets into prompts, workflow descriptions, or public documentation. Provider-specific account IDs, regions, domains, and scopes remain necessary when the connector requests them.

## Related resources

[Provider connector configuration](https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/provider-connector-configuration.md)

[Connection Ownership, Sharing, and Permissions](https://docs.stackai.com/technical-reference/connections-and-tool-execution/connection-ownership-sharing-and-permissions.md)


---

# 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.stackai.com/technical-reference/connections-and-tool-execution/api-keys-service-accounts-and-certificate-credentials.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.
