User create event hook payload: Self-registration vs CreateUser API

Hi all,

Regarding Okta event hooks, is there anything the event payload of a User Event hook whether the user was created by way of Self-registration, or through the CreateUserAsync API?

The reason I ask is because I want to handle a Self-registration and an Invited User differently in my back-end API/db.

One approach could be to add a boolean UserProfile attribute, maybe called selfRegistration. Within the event hook endpoint, I could set this to true, and within the endpoint I’ve created to invite users, set selfRegistration = false.

Any thoughts on the above?

Thank you,

Hi @Hassleboff

You can check the debugContext in order to see the URL from where the user came, which helps in differentiating the two types of requests.