Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

elivol's avatar

Authenticate Postmark webhook request

Using Laravel 9 I installed a package mvdnbrk/laravel-postmark-webhooks and created PostmarkOutboundWebhook handler.

class PostmarkOutboundWebhook { public function handle(PostmarkWebhookCalled $event): void { } } I also created PostmarkWebhookAuth class to authenticate the request. The credentials I'm gong to store in .env The request come this way: https://:@example.com/api/webhooks/postmark I listen to the request according to the package instructions: class EventServiceProvider extends ServiceProvider {

protected $listen = [
    PostmarkWebhookCalled::class => [
		PostmarkWebhookAuth::class,
        PostmarkOutboundWebhook::class,
    ],
];

}

0 likes
0 replies

Please or to participate in this conversation.