# Aggiungi badge personalizzato interrogando un'API

**URL:** <https://meta.discourse.org/t/add-custom-badge-by-querying-an-api/64038>\
**Category:** Support\
**Created:** [6 Giugno 2017, 3:16pm UTC](https://meta.discourse.org/t/add-custom-badge-by-querying-an-api/64038 "2017-06-06T15:16:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [6 Giugno 2017, 4:35pm UTC](https://meta.discourse.org/t/add-custom-badge-by-querying-an-api/64038/4 "2017-06-06T16:35:14Z")

</div>

> [@Grant a badge for all members of a group](https://meta.discourse.org/t/automatically-grant-a-badge-for-all-members-of-a-group/18147):
>
> I just created a badge for all the awesome [plugin authors](https://meta.discourse.org/badges). Creating a badge targeting a group is quite easy, just type this into the SQL box: select user\_id, created\_at granted\_at, NULL post\_id from group\_users where group\_id = ( select g.id from groups g where g.name = 'GROUP\_NAME\_IN\_LOWER\_HERE' ) I will add a trigger for this at some point so granting is faster, in the mean time just go to /sidekiq/scheduler and kick off the badge job to rush it. See [Triggered custom badge queries](https://meta.discourse.org/t/triggered-custom-badge-queries/19336) for mo…

---

_[View the full topic](https://meta.discourse.org/t/add-custom-badge-by-querying-an-api/64038)._
