CodeIgniter Forums
Processing webhooks - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Discussion (
+--- Thread: Processing webhooks (/showthread.php?tid=78576)

Processing webhooks - superior - 02-09-2021


I'm rewriting my entire application to the new CI4, the application can receive webhook actions from different providers (atleast 3). What should be the best way to process these actions.

My initial thoughts was writing a different controller for all webhook actions, this is done in CI3 as well to keep information in good order. Is there a simple of efficient way in CI4 or can i use the same approach?


  1. Query update on table(s)
  2. Log in database to keep track
  3. It's only incomming POST request nothing more.

Have been reading about the routes as well, i think i should use the post() but can this work allong with the CSRF check or should CSRF exclude these actions?

Found the solution for CSRF, it needs an excluded URL.
Did this by excluding the requested URL according to the documentation.

Thanks for the advice!