noblox.js
noblox.js copied to clipboard
createGamePass function
Is your feature request related to a problem? Please describe. Just thought that this would be a nice addition to noblox.js. I noticed that there is code to modify game passes but not to create them.
Describe the solution you'd like A function to create a gamepass on a game. Something like
const noblox = require("noblox.js");
const fs = require("fs");
// login stuff
noblox.createGamePass(12345678 /* game id */, "A friendly title", "Some description", 100 /* price */, fs.createReadStream("./icon.png"))
// if user doesn't have permission, send error message
On hold until a proper endpoint is found for this function.
POST
https://www.roblox.com/build/doverifiedupload
formdata:
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="__RequestVerificationToken"
***** (Hidden)
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="assetTypeId"
21
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="isOggUploadEnabled"
True
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="groupId"
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="onVerificationPage"
True
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="captchaEnabled"
False
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="captchaToken"
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="captchaProvider"
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="assetImageId"
7461616701
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="name"
test
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="assetTypeId"
21
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="description"
Desc
-----------------------------1650414117552438611147384475
Content-Disposition: form-data; name="targetPlaceId"
4672343617
-----------------------------1650414117552438611147384475--
I have saved the full request as curl if it is required.
There is also this: https://badges.roblox.com/docs#!/Badges/post_v1_universes_universeId_badges
POST
to https://apis.roblox.com/game-passes/v1/game-passes
Formdata: Name: string Description: string UniverseId: number File: binary //File is the image for the gamepass