Allow the Shields/* User Agent

I’m trying to make a ‘badge’ for a github project’s README, and would like to include the number of likes a post on the forum has. However, the forum seems to block API requests from https://shields.io.


This is what the badge currently looks like:

DevForum Post
I have the badge on this page: GitHub - treeben77/rblx-open-cloud: API Wrapper for Roblox Open Cloud in Python

And this is an example of what it should look like:

Static Badge
It’s need to access this API page: Rblx-open-cloud - Roblox Open Cloud Wrapper for Python! and it’s $.like_count

And finally, this is the raw badge content:

![DevForum Post](upload://8aI09RNHYNSzKSwbXYPtLwFvOVx.svg)

Shield’s User Agent is Shields/* (where the star is the variable version number).

Something strange I noticed is sometimes it does load the badge properly, but must times it does not. It is confusing me a lot. Any help would be appreciated!

4 Likes

Have you tested it on other discourse forums?

2 Likes

I tested it on https://meta.discourse.org/, and it seems to work perfectly fine:

Dynamic JSON Badge
I also tested it on another discourse theme which seemed to be just fine. I’m pretty sure it’s something to do with Roblox blocking crawlers/bots.

5 Likes

I found a solution using Roproxy. Now, it isn’t the ideal solution, and would be great if Roblox did allow Shields to access the devforum directly, but it seems to work just fine. To make it work, you need to replace roblox with roproxy in the url, like this:

https://devforum.roproxy.com/t/1991959.json

I hope this helps other people in the future

1 Like

We don’t currently officially support automated access to the forum at this time for various reasons around scale and security. Expect any unofficial API integrations you make to break at times. Apologies for the inconvenience.

UserAgent is a weak measure to identify apps because anyone can trivially fake a UserAgent, so we would be unable to use UserAgent to identify or allow-list specific apps.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.