beyondcode / laravel-mailbox

Catch incoming emails in your Laravel application
https://beyondco.de/docs/laravel-mailbox/getting-started/introduction
MIT License
1.04k stars 127 forks source link

Mailgun - HTTP webhook signing key instead of API key #119

Open StefanBayarri opened 10 months ago

StefanBayarri commented 10 months ago

Hello!

We had some issues today with the 'verifySignature' function in the 'MailgunRequest' class. We tried to use an account wide API key and a domain specific API key on Mailgun. We couldn't verify the signature with those keys. You must use the 'HTTP webhook signing key' from Mailgun to let the 'verifySignature' function succeed.

The Laravel Mailbox -> Drivers -> Available drivers -> Mailgun documentation says the following To use Laravel Mailbox with your Mailgun account, you first need to set the MAILBOX_MAILGUN_KEY environment variable to your Mailgun API key.

But it should be To use Laravel Mailbox with your Mailgun account, you first need to set the MAILBOX_MAILGUN_KEY environment variable to your HTTP webhook signing key.

The HTTP webhook signing key can be found here when logged in on Mailgun: Click on your name (upper right corner) -> API Security.

Just an heads up for someone that faces this problem as well. And perhaps the documentation could be updated.

josecastro22 commented 10 months ago

You made my day. Thank you so much.

1jason1 commented 9 months ago

Saved me today! Thank you!

dniccum commented 9 months ago

This is correct. Please update the documentation when able.

zawilliams commented 7 months ago

Def was going crazy getting a 401 and not understanding why. Thanks @StefanBayarri!

jamesdavieswales commented 6 months ago

Annnnnnd thank you for saving me from the past 3 hours of messing around with API keys

maryamhomayouni commented 2 months ago

this saved my day, thanks!