# I nomi utente potrebbero essere inclusi nel payload del webhook user\_badge?

**URL:** <https://meta.discourse.org/t/could-usernames-be-included-in-user-badge-webhook-payload/413448>\
**Category:** Support\
**Tags:** badges, webhooks\
**Created:** [28 Settembre 2026, 2:25am UTC](https://meta.discourse.org/t/could-usernames-be-included-in-user-badge-webhook-payload/413448 "2026-09-28T02:25:16Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![burke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/burke/32/4211_2.png) [@burke](https://meta.discourse.org/u/burke)\
**Post date:** [30 Settembre 2026, 2:46pm UTC](https://meta.discourse.org/t/could-usernames-be-included-in-user-badge-webhook-payload/413448/11 "2026-09-30T14:46:53Z")

</div>

> [@RGJ](#):
>
> Ciò ci riporta alla richiesta originale. Il webhook dovrebbe rispettare quel concetto e inviare il nome utente, non l’ID utente.

Concordo! Questa sembra la soluzione migliore. Aggiungere `username` e `granted_by_username` e deprecare `user_id` e `granted_by_id` potrebbe consentire un periodo di transizione senza interruzioni.

Attualmente, se un badge viene modificato dal sistema (cioè automaticamente), il webhook restituisce un `granted_by_id` pari a `-1`. Qual sarebbe l’equivalente per `granted_by_username`?

- `""` (stringa vuota)
- `"<system>"` (un valore magico che non potrebbe essere un nome utente)
- `null`
- Niente – cioè, omettere `granted_by_username` dal payload se si è trattato di un evento gestito dal sistema

Presumo che `null` o l’omissione del campo siano le opzioni più sensate.

---

_[View the full topic](https://meta.discourse.org/t/could-usernames-be-included-in-user-badge-webhook-payload/413448)._
