Closed sdarwin closed 1 year ago
Ah, at the time those docs were written, Mailgun only offered account-level API keys. Looks like the domain-specific sending keys were introduced a few years ago. (Thanks for reporting this.)
I believe either should work. The domain-specific key would generally be preferred, because Anymail doesn't need access to other parts of Mailgun's API. The exception would be if send from multiple Mailgun domains in the same app, in which case you'd need to use the account-level API key. (Or swap sending domain keys on the fly, using something like Anymail's sending hooks.)
We should update the docs to recommend using a sending domain key.
Logged in as another test account, so will re-send the answer: Yes, thanks for your reply, I will try using sending domain keys.
Hi, This is a question about documentation. On https://anymail.dev/en/stable/esps/mailgun/ it says:
MAILGUN_API_KEY Required for sending. Your Mailgun “Private API key” from the Mailgun API security settings:
It links to Account API Keys.
However there exists another type of API key. If you go to settings of a specific domain in mailgun they offer "sending api keys". https://app.mailgun.com/app/sending/domains/www.example.com/sending-keys
Would it be clearer in the documentation at https://anymail.dev/en/stable/esps/mailgun/ to add:
or
and, by the way, what is the difference, and which is preferred?