# Retrieving PagerDuty API Key

## Which Type of Access Key Pagerly Needs

To integrate with Pagerduty , Pagerly would require both the following conditions :&#x20;

* General Access Level Key : <https://support.pagerduty.com/docs/api-access-keys#section-generate-a-general-access-rest-api-key>
* The key should have Full Access (i.e. Both Read and Write scopes).&#x20;

{% hint style="info" %}
&#x20;**Summary :  For Pagerly to work fully , we would need the General Access Level with  Full Access API Key** (i.e both read and write). This is so to retreive the oncall schedule and update the schedule from Pagerly Slack App
{% endhint %}

## There are 2 ways to get to Pagerduty API Key

<details>

<summary>Use an existing Key</summary>

You can retrieve your existing key from Get the API key from here : https\://\<company>.[pagerduty.com/api\_keys](http://pagerduty.com/api_keys)

**Note:    For Pagerly to work fully , we would need the General Access Level with  Full Access API Key** (i.e both read and write). This is so to retreive the oncall schedule and update the schedule from Pagerly Slack App<br>

</details>

<details>

<summary>Generate a new Key</summary>

You can create a new key for Pagerly  :&#x20;

1. In the web app, navigate to **Integrations**  **API Access Keys** under **Developer Tools**.
2. Click **Create New API Key**.
3. Enter a **Description** to help you identify the key later.
4. Click Create Key

</details>

#### Permission levels

There are 2 types of permission levels in the API Key.

<table><thead><tr><th width="180">Role</th><th>Permission Scope</th></tr></thead><tbody><tr><td>Read</td><td>Only Read data from your Pagerduty account</td></tr><tr><td>Full (Needed to Pagerly to work fully)</td><td>Can read and write data </td></tr></tbody></table>

**Next Step is to create a team**
