|
| 1 | +--- |
| 2 | +title: Mailgun |
| 3 | +--- |
| 4 | + |
| 5 | +*This tutorial provides step-by-step instructions on how to rotate a Mailgun API Key.* |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Generate a new Mailgun API Key |
| 10 | +### Step 1 - Navigate to the Mailgun API Security page |
| 11 | +After logging in, navigate to https://app.mailgun.com/settings/api_security. |
| 12 | + |
| 13 | +Click on "Create key" in the top-right corner to generate your new API Key |
| 14 | + |
| 15 | +### Step 2 - Generate a new Mailgun API Key |
| 16 | +#### 2a. Click on "Create Key" |
| 17 | + |
| 18 | + |
| 19 | +#### 2b. Provide an "API Key Name" and click on "Create Key" |
| 20 | + |
| 21 | + |
| 22 | +### Step 3 - Copy the new key |
| 23 | +Copy the new key manually or by selecting the "Copy to Clipboard" button. Then, click "Done". |
| 24 | + |
| 25 | +> **Note:** For security reasons, Mailgun API key values are inaccessible after creation. If you lose the key, you will need to generate a new one. |
| 26 | +
|
| 27 | +--- |
| 28 | + |
| 29 | +## Replace the Leaked Mailgun API Key |
| 30 | +Replace the leaked Mailgun API key with the new one in all impacted applications and services. |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +## Revoke the Leaked Mailgun API Key |
| 35 | + |
| 36 | +### Step 1 - Navigate to the Mailgun API Key page |
| 37 | +Navigate to https://app.mailgun.com/settings/api_security. |
| 38 | + |
| 39 | +### Step 2 - Revoke the Mailgun API Key |
| 40 | +#### 2a. Delete the API Key |
| 41 | +Click on the trash can icon next to the key that you need to delete |
| 42 | + |
| 43 | + |
| 44 | +#### 2b. Confirm deletion |
| 45 | +Click on "Delete" to confirm deletion of the given API key |
| 46 | + |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## Resources |
| 51 | +- [<https://help.mailgun.com/hc/en-us/articles/203380100-Where-can-I-find-my-API-keys-and-SMTP-credentials>](https://help.mailgun.com/hc/en-us/articles/203380100-Where-can-I-find-my-API-keys-and-SMTP-credentials) |
0 commit comments