Update Webhook Missing User Information

I have set up an update webhook but I noticed that it does not include who clicked the save button. Is there any way to get that information as part of the webhook (or reliably fetch it from the dato api)

Bump

Hello @manthan

Sure, you can do

const itemVersion = await client.itemVersions.find(entity.meta.current_version);

To fetch the current last edited version of the record.

Then, you can have access to itemVersion.relationships.editor

keeping in mind that itemVersion.relationships.editor can be the ID of an API token (resolvable through client.accessTokens.find(accessTokenId))
Or a collaborator ID (resolvable through client.users.find(userId))

Depending on who made the last change to the record (a user through the dashboard, or someone through the API using an API token)

Let me know if this works :slight_smile: