You have to code it at backend, not on frontend. Also your rest of code is a little bit chaotic. Did you take a look onto the Velo-API-Docs?
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| How to assign badge on button click. | 2 | 714 | May 12, 2021 | |
| Is it possible to get a site member's badge information when the page loads? | 3 | 537 | September 3, 2020 | |
| Assign Badges sending a notification on every page visit; help! | 26 | 414 | May 9, 2022 | |
| Show/Hide elements based on badge ownership | 19 | 515 | February 17, 2022 | |
| Display elements by Badges permission | 3 | 184 | October 31, 2021 |