Mailgun
Portal configuration
To configure Mailgun via the Frontegg portal, go to your [ENVIRONMENT] → Configurations → Authentication → Emails → Providers. Press connect and fill in the relevant details required by Mailgun. To integrate with Mailgun, you must fill in the values for the API key and Domain name fields.
To obtain these values, go to your Mailgun dashboard → API keys → API security → Mailgun API keys.
API Keys
API Keys
Note that when creating a new API key, the value will only display once, so make sure you copy it and keep it somewhere safe yet accessible.
Region
Region
The Region field is mandatory, and you can choose between the Mailgun US or Mailgun EU regions, depending on the location of your account.
API configuration
To configure your external email provider via API, you will need to send a POST request to the following URL: https://{domain}.frontegg.com/identity/resources/mail/v2/configurations
.
In your POST request, include the mandatory fields filled with credentials from your Mailgun account.
To configure Mailgun specifically, you will need to send values for the secret
, domain
, and region
fields. The secret refers to the API key obtained in the Portal configuration section.
Prerequisites
Prerequisites
- An environment token from the authentication route is required to use this API. Check out the Getting Started With Frontegg APIs topic to learn more.
- Note that you will need to fill in the region field when invoking the request. Use
us
for US accounts andeu
for European accounts.
The domain value is located in the left-hand menu of your Mailgun dashboard. Go to the Send section → Sending → Domains, as indicated below: