Are there ROBLOX API wrappers for REGULAR Javascript?

My extension interacts with the ROBLOX API and I assumed I was going to need to make every function one by one… Until I remembered about this library I heard of called “Noblox.JS”

Nice now I don’t have to waste my time making boilerplate code
Oh wait what’s this? It’s for Node.JS?
Oh well, time to search for better alternatives
Oh… Every SINGULAR ROBLOX API wrapper made in Javascript is made for Node.JS?

Oh noes! Oh woe! Alas, What shall I do now? What actions must I partake in to mend this horrible mishap I have crossed paths with? How mockingly my niggardly peers must think of me for acting so perplexed and bewildered by this miniscule, niggly struggle - quite the epitome of duncish behaviour to say the least. How I have endeavored with every last bit of strength. How I have attempted to push forward with the persistance I had left. Unfortunately, to my dismay, quickly have I recognized the fire that has been set ablaze has been put out. Looking in my wearied eyes, you could see the despair. I knew from the bottom of my heart, I couldn’t… I musn’t continue. Going even further would take a toll on my mind and body. I sense there is somebody more worthy out there brave enough to endure the difficulties of this task. Oh, how I yearn for the guidance and salvation of my future merciful saviour, to heal my sorrowful, saddened soul.

Ok pls help Thanks :pray:

1 Like

Pls somebody help I need this :pray: :pray:

BLUD I NEED THIS SO BAD PLS BRO

This may be the best way to do this actually. It gives you total control over how you interact with the APIs and freedom to modify your calls in case Roblox changes something in an upcoming update(I have seen them mess with the urls way too many times). If you feel writing API call code starts to get repetitive you can make helper functions so you write less(for example most GET requests are similar to each other, same goes for POST requests).

It also gifts you with http request knowledge.

1 Like

Blud I never said it was fixed What is this :pray:

1 Like

just write normal fetch() for every api req, or just shorten it with a function. what type of extension are u tryna make

1 Like

Tools to help you with ROBLOX stuff

in that case, u could atlease shorten how u do requests, like

function rbx( sub, path, method, body ) {
    return fetch(`https://${sub}.roblox.com${path}`, ( method != "GET" ) && { method, headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) }).then(a=>a.json())
}

const idk = rbx("presence", "/v1/presence/users", "POST", { ... })

u cant pray for a random wrapper to fall out of the sky :man_shrugging:
looks more beautiful than writing fetch() repeatedly

1 Like
const fetchApi = async (category, api, method = "GET", body, headers = { "Content-Type": "application/json" }) =>
	(await 
		fetch(`https://${category}.roblox.com${api}`, {
			method,
			headers,
			body: JSON.stringify(body ?? undefined),
		})
	).json();

Is this good?

lol yea, putting default values would be even better

1 Like

Roblox won’t let you use these endpoints in the browser due to CORS.

1 Like

as far as i know, chrome extensions can bypass cors by modifying the manifest

Yeah, but not everyone has that extension. The goal is to make something that everyone can use in the browser.

Hey, @ChatGGPT

That’s a glitch, I’ve seen it happen in multiple occasions.

1 Like

not sure what you actually mean, but i meant that the op can modify their own extension’s manifest, and anyone who installs the extension on chrome-based browsers will be able to bypass the cors for the api hostnames

Yes I am using a Chrome Extension