UserHasBadgesAsync would have almost identical functionality to UserHasBadgeAsync, however it would take an array of badgeIds instead of a single badgeId.
It would return relevant information (likely as a table or possibly two tables) on what badges a user does and does not own.
I have several experiences with large quantities of badges used as achievements.
Users often wish to achieve all badges in an experience. Thus, users need to see their progress. The only way this is currently possible is via the website or an in-game UI. The most engaging way is within the experience. This would encourage players to stay in an experience for longer to complete all it has to offer.
Given that info, it makes sense to display a user’s badge progress from within the experience. Currently, getting a user’s badge progress is cumbersome, non-intuitive, and it has a heap of technical issues.
With the current BadgeService APIs, I am unable to easily process if a user owns multiple badges.
The current method is to get badge ownership status one at a time and save it to a DataStore for future calls. This method still has throttle issues at medium/large scales and creates a clunky experience. Forcing a user to wait for a UI or to get their badge progress is silly. This is neither scalable nor intuitive.
Large Roblox events (such as Metaverse Champions) have this exact use case already - if there is to be more events like it in the future (or if developers wish to make similar events), this use case should be simplified.
Cherry On Top
Create this API alongside BadgeService:GetBadgesInfoAsync.
One call with the ability to get info without supplying EVERY badge ID is super useful. This solution (GetBadgesInfoAsync) is much more dynamic, simple, and useful than any alternatives.
It would allow developers to easily grab all info about an experience’s badges and check if a user owns them. Many lines of code, with annoying error checking loops, with a manually written badgeId array would boil down into two simple methods with proper pcall usage.