<@U04UQ68083H> what webhooks can I run after `sess...
# ory-copilot
l
@chilly-king-10285 what webhooks can I run after
session
on registration?
b
A message from kapa.ai
Based on the knowledge sources provided, I can answer your question about webhooks that can be run after the
session
hook on registration in Ory. The
session
hook is used to sign in the user immediately after successful registration. However, it's important to note that no other hooks can be executed after the
session
hook because it modifies the HTTP response [Ory Actions documentation](https://www.ory.sh/docs/actions/session). This means that if you want to run any webhooks or other actions after registration, they need to be placed before the
session
hook in the configuration. The
session
hook should be the last one in the sequence. For example, you could configure a
web_hook
action before the
session
hook to trigger custom logic after registration but before the user is signed in. Here's an example configuration:
Copy code
yaml registration:   after:     password:       hooks:         - hook: web_hook           config:             # webhook configuration here         - hook: session
In this configuration, the
web_hook
would be triggered first, and then the
session
hook would sign in the user [Github issue comment](https://github.com/ory/network/issues/346#issuecomment-1743056708). It's also worth noting that if you need to run multiple actions that modify the HTTP response, you should ensure that the
session
hook is triggered last [Ory Actions documentation](https://www.ory.sh/docs/actions/session). To summarize, you can't run webhooks after the
session
hook, but you can run them before it. The
session
hook should always be the last one in your configuration for the registration flow.