# Retrieving OpsGenie API Key

{% hint style="info" %}
To view/read/write API Key in Opsgenie, you need to have Owner / Admin Role.&#x20;
{% endhint %}

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

<details>

<summary>Use an existing Key</summary>

You can retrieve your existing key from Get the API key from here :&#x20;

[https://\<opsgenie-account>.app.opsgenie.com/settings/api-key-management](https://pagerly-2.app.opsgenie.com/settings/api-key-management)

**Note:    For Pagerly to work fully, we would need the API key with 3 Access Rights:** \
Read, Create and Update, Configuration Access

</details>

<details>

<summary>Generate a new Key</summary>

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

1. In the web app, navigate to **Settings (**[https://\<opsgenie-account>.app.opsgenie.com/settings](https://pagerly-2.app.opsgenie.com/settings/api-key-management)**)**
2. Go to API Settings and then click API Key Management
3. Click **Add new API Key**
4. Generate a new API Key **with 3 Access Rights:**  Read, Create and Update, Configuration Access

</details>

#### Permission levels

Pagerly needs only 3 Access Rights:\
Read, Create and Update, Configuration Access

Details below about all the Permission scope in OpsGenie 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 Opsgenie account</td></tr><tr><td>Create and Update</td><td>Can read and write data </td></tr><tr><td>Configuration access</td><td>For OpsGenie APIs to work</td></tr><tr><td>Delete</td><td>Delete any resource ( Pagerly does not need this Role)</td></tr></tbody></table>

**The next Step is to create a team**
