Add domain specific Sending API Key

Created on 22 December 2023, 11 months ago
Updated 12 January 2024, 11 months ago

Problem/Motivation

Currently only the keys from https://app.mailgun.com/settings/api_security work when adding an account level private key to the configuration page.

It would be nice to add domains specific keys to that page (with new domain field) as an option. This way you don't need to use your account level key for a specific domain.

From mailgun's help page: Where Can I Find my API Key and SMTP Credentials

Domain Sending Keys

Domain Sending Keys are API keys that only allow sending messages using a POST call via our /messages and /messages.mime endpoints for the domain in which they are created for. We'll show you how to do this below:

  • First, log in to the Mailgun Control Panel (if you have not already done so).
  • Then, within the left-hand navigation pane, click the Sending option to expand its list of sub-options.
  • Next, click the Domain settings suboption, and then click on the Sending API keys tab.
  • Click the Add sending key button.
  • In the pop-up modal, enter a suitable description (such as the name of the application or client you're creating the key for) before finally clicking the Create sending key button.
  • Copy your sending API key and keep it in a safe place. For security purposes, we will not be able to show you the key again. If you lose your key, you will need to create a new key.

Steps to reproduce

Adding a valid domain specific key to the `/admin/config/services/mailgun/settings` page fails

Adding a valid account key to the `/admin/config/services/mailgun/settings` saves as intended.

Proposed resolution

  • Add select box for account / domain option
  • Add new field for user to enter their domain
  • Add ability to save domain key

Remaining tasks

  • Check if there are any limitations using the domain specific keys.
  • Implement

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada sagesolutions

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024