> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Credentials

A credential proves which principal is sending a request. IAM then decides the request for that principal, and the credential never augments what the principal's roles allow.

## Types

Each credential type belongs to a user or to a service account, never to both.

### A User's Credentials

| Credential | What It Is |
| - | - |
| [API key](https://developers.telnyx.com/docs/development/api-fundamentals/create-api-keys.md) | Proves the [user](https://developers.telnyx.com/docs/iam/principals/users.md) who created it. Long-lived, with an optional expiry. |
| Session | Proves the user signed in to Mission Control Portal. Short-lived. |
| OAuth token | Proves the user who authorized an application, such as the [Telnyx CLI](https://developers.telnyx.com/docs/development/cli.md) or an AI agent acting for that person. Narrowed to the scope the user approved for that application. |

### A Service Account's Credentials

| Credential | What It Is |
| - | - |
| [Service account token](https://developers.telnyx.com/docs/iam/principals/service-accounts.md#tokens) | Proves the [service account](https://developers.telnyx.com/docs/iam/principals/service-accounts.md) it was issued to. Long-lived. |
| [Short-lived token](https://developers.telnyx.com/docs/iam/principals/trusted-workloads.md)<sup>Preview</sup> | Proves a service account for one hour, in exchange for a token a trusted workload already holds. |

An API key never belongs to a service account, and a service account token never belongs to a user.

An AI agent is never a principal. The principal is the person or the service account, and the agent holds a credential on its behalf.

## What a Credential Carries

Every credential belongs to exactly one principal and has a status and an optional expiry. Revoking it, or disabling its principal, refuses every request it sends.

Preview A user's API key also carries a [scope](https://developers.telnyx.com/docs/iam/credentials/scoped-keys.md), statements that narrow what it may do. A service account's credentials carry no scope and do exactly what the service account's roles allow, so each job gets a service account of its own.

Preview An API key or a service account token also names the networks it accepts requests from.

## Order of Checks

Telnyx authenticates the credential before anything else. An invalid, expired, or revoked credential answers `401` whatever the roles say. After IAM allows the request, an OAuth token's approved scope still applies, so a token approved for fewer actions than the user holds stays narrower.
