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

# Get Credentials

> Step-by-step instructions for obtaining PagerDuty REST API tokens and webhook signing secrets for the Corsair PagerDuty plugin.

This guide walks you through obtaining all required credentials for the PagerDuty plugin.

## Authentication Method

The PagerDuty plugin uses API key authentication.

* **[`api_key`](/concepts/api-key)** (default) — REST API token sent as `Authorization: Token token=<token>`

## API Token

### Step 1: Create an API Token

1. Log in to [PagerDuty](https://www.pagerduty.com/).
2. Open your user menu → **User settings** → **User settings** (or **API access** / **Personal settings** depending on UI).
3. Under **API Access**, create a new **API token** (General Access with REST API, or the token type your organization allows for automation).
4. Copy the token when shown — you may not be able to view it again.

Use a token with at least the permissions required for the incidents, notes, and log-entry operations you plan to call.

**Storing credentials:**

```bash theme={null}
pnpm corsair setup --plugin=pagerduty api_key=your-api-token
```

Verify:

```bash theme={null}
pnpm corsair auth --plugin=pagerduty --credentials
```

## Webhook Signing Secret

PagerDuty v3 webhooks can be verified using a signing secret associated with your webhook subscription.

1. In PagerDuty, open **Integrations** → **Generic Webhooks** (or your webhook subscription type).
2. Create or edit a subscription pointing at your HTTPS endpoint.
3. Copy the **signing secret** (or signing key) PagerDuty provides for verifying `X-Pagerduty-Signature`.

**Storing credentials:**

```bash theme={null}
pnpm corsair setup --plugin=pagerduty webhook_signature=your-signing-secret
```

## Required Credentials Summary

| Credential             | Required for                        | Where to find                |
| ---------------------- | ----------------------------------- | ---------------------------- |
| REST API token         | [`api_key`](/concepts/api-key) auth | User settings → API access   |
| Webhook signing secret | Webhooks                            | Webhook subscription details |

For general information about how Corsair handles authentication, see [Authentication](/concepts/auth).
