### JavaScript Example: Get Bundle Recommendations Source: https://cameronpcampbell.github.io/openblox/classic/catalog/recommendationsForBundle Demonstrates how to call the recommendationsForBundle API using JavaScript to retrieve recommendations for a specific bundle ID. ```JavaScript const { data: bundles } = await ClassicCatalogApi.recommendationsForBundle({ bundleId: 429, amount: 1 }); ``` -------------------------------- ### JavaScript Example: Get Game Recommendations Source: https://cameronpcampbell.github.io/openblox/classic/games/recommendationsFromUniverse Demonstrates how to call the recommendationsFromUniverse API using JavaScript to retrieve game recommendations for a specific universe ID. ```JavaScript const { data: recommendations } = await ClassicGamesApi.recommendationsFromUniverse({ universeId: 1685831367 }); ``` -------------------------------- ### JavaScript Example: Fetch VIP Server Configuration Source: https://cameronpcampbell.github.io/openblox/classic/develop/vipServerConfigurationForUniverse An example demonstrating how to programmatically fetch the VIP server configuration for a given universe ID using the ClassicDevelopApi in JavaScript. ```JavaScript const { data: config } = await ClassicDevelopApi.vipServerConfigurationForUniverse({ universeId: 5638577595 }); ``` -------------------------------- ### Implementing Roblox OAuth with Arctic and Bun.serve Source: https://cameronpcampbell.github.io/openblox/guides/oauth This TypeScript code demonstrates a basic Roblox OAuth application. It uses the Arctic library to handle the OAuth flow (authorization URL creation, token exchange) and Bun.serve for the HTTP server. The example includes environment variable setup for client ID/secret, redirect URI configuration, and functions for managing cookies (setting, deleting, parsing) to store OAuth state and code verifier. ```TypeScript // [ Modules ] /////////////////////////////////////////////////////////////////// import "dotenv/config"; import { OAuthApi } from "openblox/cloud"; ////////////////////////////////////////////////////////////////////////////////// // [ Variables ] ///////////////////////////////////////////////////////////////// const CLIENT_ID = process.env.ROBLOX_CLIENT_ID as string // Make sure `ROBLOX_CLIENT_ID` is in your environment! const CLIENT_SECRET = process.env.ROBLOX_CLIENT_SECRET as string // Make sure `ROBLOX_CLIENT_SECRET` is in your environment! const PORT = 3000 const REDIRECT_PATH = `/oauth/roblox/callback` const REDIRECT_URI = `http://localhost:${PORT}${REDIRECT_PATH}` // Make sure this redirect uri is whitelisted in your Oauth app! const STATE_COOKIE_NAME = "oauth.roblox.state" const VERIFIER_COOKIE_NAME = "oauth.roblox.verifier" ////////////////////////////////////////////////////////////////////////////////// // [ Private Functions ] ///////////////////////////////////////////////////////// const createCookie = ( name: string, value: string, options: { secure?: boolean, path?: string, httpOnly?: boolean, maxAge?: number } ) => { let cookieString = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`; if (options.maxAge) cookieString += `; max-age=${options.maxAge}` if (options.path) cookieString += `; path=${options.path}` if (options.secure) cookieString += '; secure' if (options.httpOnly) cookieString += '; httponly' return cookieString } const createCookieDeletion = (name: string) => `${name}=deleted; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT` const parseCookies = (cookieHeader?: string | null): Record => { const cookies: Record = {}; if (!cookieHeader) return cookies cookieHeader.split('; ').forEach(pair => { const [key, ...values] = pair.split('=') if (!key || !values) return const value = values.join('=') cookies[key.trim()] = value.trim() }) return cookies; } ////////////////////////////////////////////////////////////////////////////////// ;(async () => { const { Roblox, generateState, generateCodeVerifier } = await import("arctic") const roblox = new Roblox(CLIENT_ID, CLIENT_SECRET, REDIRECT_URI); Bun.serve({ async fetch({ url:reqUrl, headers:reqHeaders }: Request) { const { pathname, searchParams } = new URL(reqUrl) console.log(`Requesting \`${pathname}\``) // Decides which page to return where each case is a different page. switch (pathname) { case "/oauth/roblox": { try { const state = generateState(); const codeVerifier = generateCodeVerifier(); const scopes = ["openid", "profile"]; const authUrl = await roblox.createAuthorizationURL(state, codeVerifier, { scopes }); const stateCookie = createCookie(STATE_COOKIE_NAME, state, { secure: false, path: "/", httpOnly: true, maxAge: 60 * 10 // 10 minutes. }) const codeVerifierCookie = createCookie(VERIFIER_COOKIE_NAME, codeVerifier, { secure: false, path: "/", httpOnly: true, maxAge: 60 * 10 // 10 minutes. }) const resHeaders = new Headers() resHeaders.append("Location", authUrl.toString()) resHeaders.append("Set-Cookie", stateCookie) resHeaders.append("Set-Cookie", codeVerifierCookie ) return new Response(null, { status: 302, headers: resHeaders }) } catch (e) { console.log(e) return new Response("An unexpected error occurred!", { status: 500 }) } } case REDIRECT_PATH: { try { const resHeaders = new Headers() resHeaders.append("Set-Cookie", createCookieDeletion(STATE_COOKIE_NAME)) resHeaders.append("Set-Cookie", createCookieDeletion(VERIFIER_COOKIE_NAME)) const codeParam = searchParams.get("code"), stateParam = searchParams.get("state") if (!codeParam || !stateParam) return new Response("ERROR 422: Missing `code` and or `state` search parameters!", { status: 422, headers: resHeaders }) const cookies = parseCookies(reqHeaders.get("cookie")) ``` -------------------------------- ### Get Product Information for Multiple Games (JavaScript Example) Source: https://cameronpcampbell.github.io/openblox/classic/games/universesProductInfo Demonstrates how to use the `ClassicGamesApi.universesProductInfo` method to retrieve product details for specified game IDs using an asynchronous call. ```JavaScript const { data: products } = await ClassicGamesApi.universesProductInfo({ universeIds: [1685831367] }); ``` -------------------------------- ### JavaScript Example: Calling listStandardDatastoreEntryVersions Source: https://cameronpcampbell.github.io/openblox/cloud/standardDataStores_V1/listStandardDatastoreEntryVersions An example demonstrating how to call the listStandardDatastoreEntryVersions API using JavaScript, showing parameter usage and asynchronous retrieval of data. ```JavaScript const { data: versions } = await StandardDataStoresApi_V1.listStandardDatastoreEntryVersions({ universeId: 5097539509, datastoreName: "InventoryStore", entryKey: "user/45348281", sortOrder: "Ascending", limit: 1, }); ``` -------------------------------- ### API Documentation: Get Team Create Settings for Universes Source: https://cameronpcampbell.github.io/openblox/classic/develop/teamCreateSettingsForUniverses Comprehensive API documentation for retrieving team create settings across multiple universes. Includes method details, parameters, the associated endpoint, and example response data. ```APIDOC Method: teamCreateSettingsForUniverses Description: Gets team create settings for many universes. Parameters: - Name: universeIds Type: ArrayNonEmptyIfConst Description: The ID of the universe to get team create settings for. Endpoint: GET /v1/universes/multiget/teamcreate Example Data: { "6069031486": { "isEnabled": false } } ``` -------------------------------- ### JavaScript Example for Getting Instance Information Source: https://cameronpcampbell.github.io/openblox/cloud/engine/instanceInfo Provides a JavaScript code snippet demonstrating how to asynchronously fetch instance details using the EngineApi.instanceInfo method, specifying the universeId, placeId, and instanceId. ```javascript const { data: instance } = await EngineApi.instanceInfo({ universeId: 5795192361, placeId: 16866553538, instanceId: "root", }); ``` -------------------------------- ### JavaScript Example for ClassicGamePassesApi.createGamePass Source: https://cameronpcampbell.github.io/openblox/classic/gamePasses/createGamePass Demonstrates how to call the `createGamePass` method using JavaScript, providing example values for `universeId`, `name`, and `description`. ```JavaScript const { data: gamePassId } = await ClassicGamePassesApi.createGamePass({ universeId: 1685831367, name: "My Pass", description: "Lorem Ipsum..." }); ``` -------------------------------- ### Example Usage of authedUserFollowUniverse API Source: https://cameronpcampbell.github.io/openblox/cloud/legacyFollowings/authedUserFollowUniverse Demonstrates how to call the authedUserFollowUniverse API using JavaScript, including the specific example data used in the request. ```JavaScript const { data: ids } = await LegacyFollowingsApi.authedUserFollowUniverse({ universeId: 4922741943, userId: 45348281 }); ``` ```JSON { "universeId": 4922741943, "userId": 45348281 } ``` -------------------------------- ### JavaScript Example: Get Share Link Information Source: https://cameronpcampbell.github.io/openblox/classic/shareLinks/shareLinkInfo Demonstrates how to call the 'shareLinkInfo' method using JavaScript. It shows how to pass the 'shareLinkId' and destructure the response to get 'linkInfo'. This example uses an asynchronous API call. ```JavaScript const { data: linkInfo } = await ClassicShareLinksApi.shareLinkInfo({ shareLinkId: "0629f8e684039c4d800a1a03623e7a6f" }); ``` -------------------------------- ### JavaScript Example: Get Group Payout Eligibility Source: https://cameronpcampbell.github.io/openblox/classic/economy/groupPayoutsUserEligibility Demonstrates how to call the `groupPayoutsUserEligibility` API using JavaScript, providing example `groupId` and `userIds`. ```javascript const { data: eligibility } = await ClassicEconomyApi.groupPayoutsUserEligibility({ groupId: 14941564, userIds: [1412728377], }); ``` -------------------------------- ### JavaScript Example: Fetch Team Create Settings Source: https://cameronpcampbell.github.io/openblox/classic/develop/teamCreateSettingsForUniverse Demonstrates how to programmatically fetch team create settings for a given universe ID using the `ClassicDevelopApi` in JavaScript. ```JavaScript const { data: settings } = await ClassicDevelopApi.teamCreateSettingsForUniverse({ universeId: 6069031486 }); ``` -------------------------------- ### Get Group Role Information Example (JavaScript) Source: https://cameronpcampbell.github.io/openblox/cloud/groups/groupRole An example demonstrating how to call the `groupRole` API using JavaScript to retrieve role details for a given `groupId` and `roleId`. ```JavaScript const { data: role } = await GroupsApi.groupRole({ groupId: 5850082, roleId: 48715304 }); ``` -------------------------------- ### Example Data: Catalog Batch Info Response Source: https://cameronpcampbell.github.io/openblox/classic/catalog/catalogBatchInfo Illustrates the structure and content of the data returned by the `catalogBatchInfo` endpoint. This example shows detailed properties for both a bundle and an asset, including their IDs, types, names, prices, and other relevant metadata. ```JSON [ { "id": 429, "itemType": "Bundle", "bundleType": 1, "name": "Magma Fiend", "description": "He's got hot blood, with a temperature of nine hundred and three.", "productId": 7219806593957530, "itemStatus": [], "itemRestrictions": [], "creatorHasVerifiedBadge": true, "creatorType": "User", "creatorTargetId": 1, "creatorName": "Roblox", "price": 300, "lowestPrice": 300, "lowestResalePrice": 0, "unitsAvailableForConsumption": 0, "purchaseCount": 0, "favoriteCount": 520324, "offSaleDeadline": null, "collectibleItemId": "e036077b-ed8d-4bf1-9193-4e64bbc86978", "totalQuantity": 0, "saleLocationType": "ShopAndAllExperiences", "hasResellers": false }, { "id": 2608538559, "itemType": "Asset", "assetType": 31, "name": "Magma Fiend - Right Leg", "description": "He's got hot blood, with a temperature of nine hundred and three.", "productId": 427839098, "itemStatus": [], "itemRestrictions": [], "creatorHasVerifiedBadge": true, "creatorType": "User", "creatorTargetId": 1, "creatorName": "Roblox", "priceStatus": "Off Sale", "purchaseCount": 0, "favoriteCount": 9887, "offSaleDeadline": null, "saleLocationType": "NotApplicable", "isOffSale": true } ] ``` -------------------------------- ### JavaScript Example: Get Featured Event for Group Source: https://cameronpcampbell.github.io/openblox/classic/groups/featuredEvent An example demonstrating how to call the ClassicGroupsApi.featuredEvent method using JavaScript to retrieve the featured event ID for a given group. ```JavaScript const { data: eventId } = await ClassicGroupsApi.featuredEvent({ groupId: 15842838 }); ``` -------------------------------- ### Example Response Data for Bundle Recommendations Source: https://cameronpcampbell.github.io/openblox/classic/catalog/recommendationsForBundle Provides a sample JSON structure representing the data returned by the recommendationsForBundle API, detailing bundle information, items, creator, and product details. ```JSON [ { "id": 598, "name": "Elemental Crystal Golem", "description": "The light of an Elemental is controlled by its summoner, so its pretty much like a giant glowing mood ring. ", "bundleType": "BodyParts", "items": [ { "id": 4504227797, "name": "Elemental Crystal Golem - Left Arm", "type": "Asset" }, { "id": 4504228958, "name": "Elemental Crystal Golem - Left Leg", "type": "Asset" }, { "id": 4504228453, "name": "Elemental Crystal Golem - Right Arm", "type": "Asset" }, { "id": 4504229658, "name": "Elemental Crystal Golem - Right Leg", "type": "Asset" }, { "id": 4504230246, "name": "Elemental Crystal Golem - Torso", "type": "Asset" }, { "id": 4504231783, "name": "Elemental Crystal Golem - Shoulder Rock", "type": "Asset" }, { "id": 2510235063, "name": "Rthro Idle", "type": "Asset" }, { "id": 2510230574, "name": "Rthro Climb", "type": "Asset" }, { "id": 2510233257, "name": "Rthro Fall", "type": "Asset" }, { "id": 2510236649, "name": "Rthro Jump", "type": "Asset" }, { "id": 2510238627, "name": "Rthro Run", "type": "Asset" }, { "id": 2510240941, "name": "Rthro Swim", "type": "Asset" }, { "id": 2510242378, "name": "Rthro Walk", "type": "Asset" }, { "id": 1791810588, "name": "Elemental Crystal Golem", "type": "UserOutfit" }, { "id": 15057738572, "name": "Elemental Crystal Golem - Head", "type": "Asset" }, { "id": 11573370910, "name": "Anime - Mood", "type": "Asset" }, { "id": 23452708388, "name": "Elemental Crystal Golem - Head", "type": "UserOutfit" } ], "creator": { "id": 1, "name": "Roblox", "type": "User", "hasVerifiedBadge": true }, "product": { "id": 1066235020906534, "type": "productType", "isPublicDomain": false, "isForSale": true, "priceInRobux": 400, "isFree": false, "noPriceText": null }, "collectibleItemDetail": { "collectibleItemId": "5529c928-ca35-4fba-91d8-9b63f81a1ae2", "collectibleProductId": null, "price": 400, "lowestPrice": 400, "lowestResalePrice": 0, "totalQuantity": 0, "unitsAvailable": 0, "saleLocation": { "saleLocationType": "ShopAndAllExperiences", "saleLocationTypeId": 5, "universeIds": [], "enabledUniverseIds": [] }, "hasResellers": false, "saleStatus": "OnSale", "quantityLimitPerUser": null, "offSaleDeadline": null, "collectibleItemType": "NonLimited", "lowestAvailableResaleProductId": null, "lowestAvailableResaleItemInstanceId": null, "resaleRestriction": "Disabled" } } ] ``` -------------------------------- ### ClassicUsersApi: Get User Information (userInfo) Source: https://cameronpcampbell.github.io/openblox/classic/users/userInfo Comprehensive documentation for the 'userInfo' API endpoint, including its parameters, a JavaScript usage example, an example of the returned data structure, and the API endpoint path. ```APIDOC userInfo: Parameters: userId: Type: UserId Description: The id of the user to get detailed info about. ``` ```JavaScript const { data: userInfo } = await ClassicUsersApi.userInfo({ userId: 45348281 }); ``` ```JSON { "description": "Lorem ipsum dolor sit amet consectetur adipiscing elit.", "created": "2013-07-13T07:50:00.083Z", "isBanned": false, "externalAppDisplayName": null, "hasVerifiedBadge": false, "id": 45348281, "name": "MightyPart", "displayName": "MightyPart" } ``` ```APIDOC Endpoint: GET /v1/users/{userId} ``` -------------------------------- ### Example Response Data for ClassicCatalogApi.bundlesInfo Source: https://cameronpcampbell.github.io/openblox/classic/catalog/bundlesInfo Provides a comprehensive JSON example of the data structure returned by the `bundlesInfo` endpoint, showcasing details for a 'Magma Fiend' bundle including its items, creator, product, and collectible attributes. ```JSON [ { "id": 429, "name": "Magma Fiend", "description": "He's got hot blood, with a temperature of nine hundred and three.", "bundleType": "BodyParts", "items": [ { "id": 2608534881, "name": "Magma Fiend - Left Arm", "type": "Asset" }, { "id": 2608536258, "name": "Magma Fiend - Left Leg", "type": "Asset" }, { "id": 2608537440, "name": "Magma Fiend - Right Arm", "type": "Asset" }, { "id": 2608538559, "name": "Magma Fiend - Right Leg", "type": "Asset" }, { "id": 2608539495, "name": "Magma Fiend - Torso", "type": "Asset" }, { "id": 2510230574, "name": "Rthro Climb", "type": "Asset" }, { "id": 2510233257, "name": "Rthro Fall", "type": "Asset" }, { "id": 2510235063, "name": "Rthro Idle", "type": "Asset" }, { "id": 2510236649, "name": "Rthro Jump", "type": "Asset" }, { "id": 2510238627, "name": "Rthro Run", "type": "Asset" }, { "id": 2510240941, "name": "Rthro Swim", "type": "Asset" }, { "id": 2510242378, "name": "Rthro Walk", "type": "Asset" }, { "id": 474312030, "name": "Magma Fiend", "type": "UserOutfit" }, { "id": 12726967427, "name": "Magma Fiend - Head", "type": "Asset" }, { "id": 11573370910, "name": "Anime - Mood", "type": "Asset" }, { "id": 23452425262, "name": "Magma Fiend Head", "type": "UserOutfit" } ], "creator": { "id": 1, "name": "Roblox", "type": "User", "hasVerifiedBadge": true }, "product": { "id": 7219806593957530, "type": "productType", "isPublicDomain": false, "isForSale": true, "priceInRobux": 300, "isFree": false, "noPriceText": null }, "collectibleItemDetail": { "collectibleItemId": "e036077b-ed8d-4bf1-9193-4e64bbc86978", "collectibleProductId": null, "price": 300, "lowestPrice": 300, "lowestResalePrice": 0, "totalQuantity": 0, "unitsAvailable": 0, "saleLocation": { "saleLocationType": "ShopAndAllExperiences", "saleLocationTypeId": 5, "universeIds": [], "enabledUniverseIds": [] }, "hasResellers": false, "saleStatus": "OnSale", "quantityLimitPerUser": null, "offSaleDeadline": null, "collectibleItemType": "NonLimited", "lowestAvailableResaleProductId": null, "lowestAvailableResaleItemInstanceId": null, "resaleRestriction": "Disabled" } } ] ``` -------------------------------- ### Example Response Data for creatorStoreProductInfo Source: https://cameronpcampbell.github.io/openblox/cloud/creatorStore/creatorStoreProductInfo Illustrates the structure and content of the data returned by the creatorStoreProductInfo API call, including product details, pricing, and asset IDs. ```JSON { "path": "creator-store-products/CreatorMarketplaceAsset-Model-16989381169", "displayName": "monkey", "description": "", "basePrice": { "currencyCode": "USD", "quantity": { "significand": 0, "exponent": 0 } }, "purchasePrice": { "currencyCode": "USD", "quantity": { "significand": 0, "exponent": 0 } }, "published": false, "restrictions": [], "purchasable": false, "userSeller": "45348281", "modelAssetId": "16989381169" } ``` -------------------------------- ### Get Authenticated User Country Code (JavaScript Example) Source: https://cameronpcampbell.github.io/openblox/classic/users/authenticatedUserCountryCode This JavaScript example demonstrates how to call the `authenticatedUserCountryCode` method from the `ClassicUsersApi` to fetch the country code of the currently authenticated user. It uses destructuring to extract the `countryCode` from the response. ```JavaScript const { data: countryCode } = await ClassicUsersApi.authenticatedUserCountryCode(); ``` -------------------------------- ### placeServerList API Reference and Usage Source: https://cameronpcampbell.github.io/openblox/classic/games/placeServerList Comprehensive documentation for the `placeServerList` API, detailing its parameters, a JavaScript example for invocation, the structure of the returned data, and the HTTP endpoint for direct access. ```APIDOC Name | Type | Description -----------|--------------------------|-------------------------------------------------- placeId | Identifier | The ID of the place to get private servers for. serverType | "Friends" | "Public" | The type of servers to return. excludeFullGames? | boolean | If full games should be omitted from the response. limit? | 10 | 25 | 50 | 100 | The number of results per request. sortOrder? | SortOrder | The order the results are sorted in. cursor? | string | The paging cursor for the previous or next page. ``` ```JavaScript const { data: servers } = await ClassicGamesApi.placeServerList({ placeId: 26838733, serverType: "Public" }); ``` ```JSON [ { "id": "1cf0594e-196a-469d-a9f8-ac0c7a1a0c89", "maxPlayers": 10, "playing": 6, "playerTokens": [ "7532A11338571C5B914711CECB920A9C", "576940A121EC4A28EDF1A984FB4D40BA", "4AC528DB8689F636EE495A31219B4156", "DC41B4724EC46B0D561458B378C52A25", "FB9F483ACD1B0C22A916F12F2B8C5EE5" ], "players": [], "fps": 59.942818, "ping": 82 }, { "id": "3a492d51-1b28-4f5b-92f5-ea7f8eb81a05", "maxPlayers": 10, "playing": 4, "playerTokens": [ "4FA1CB5B5D01574AB7E1A1AEFA683894", "DE71FC497ACEA320A57B2E168AF851ED", "0B9CB48166467EE29E89564A7A9CCB68", "13FCCCF441B16EFF86C938D8440FB9F0" ], "players": [], "fps": 59.995846, "ping": 216 }, { "id": "3333da7e-8a94-464a-b749-9162404c3f71", "maxPlayers": 10, "playing": 3, "playerTokens": [ "D98666B566AD7834D20A02A7C4554E22", "EB2D522809D8F87E41778ABEF349F305", "97A0BA814C637D44F2A3E1A8AD190837" ], "players": [], "fps": 59.955658, "ping": 138 } ] ``` ```HTTP GET /v1/games/{placeId}/servers/{serverType} ``` -------------------------------- ### JavaScript Example: Get Friend Statuses using ClassicFriendsApi Source: https://cameronpcampbell.github.io/openblox/classic/friends/friendsStatuses Demonstrates how to call the `friendsStatuses` method of the `ClassicFriendsApi` to retrieve friendship statuses between a user and a list of related users. It uses async/await for handling the API call and destructures the response to get the data. ```JavaScript const { data: statuses } = await ClassicFriendsApi.friendsStatuses({ userId: 45348281, relatedUserIds: [2655994471] }); ``` -------------------------------- ### JSON Example Data: VIP Server Configuration Response Source: https://cameronpcampbell.github.io/openblox/classic/develop/vipServerConfigurationForUniverse An example of the JSON data structure returned by the `vipServerConfigurationForUniverse` API endpoint, showing typical values for enabled status, price, and server/subscription counts. ```JSON { "isEnabled": false, "price": null, "activeServersCount": 0, "activeSubscriptionsCount": 0 } ``` -------------------------------- ### JavaScript Example: Get Bundles Owned by User Source: https://cameronpcampbell.github.io/openblox/classic/catalog/bundlesOwnedByUser Demonstrates how to programmatically fetch bundles owned by a user using the ClassicCatalogApi in JavaScript. ```JavaScript const { data: bundles } = await ClassicCatalogApi.bundlesOwnedByUser({ userId: 45348281 }); ``` -------------------------------- ### JavaScript Example for ClassicSubscriptionsApi.createSubscription Source: https://cameronpcampbell.github.io/openblox/classic/subscriptions/createSubscription A JavaScript code snippet demonstrating how to invoke the `createSubscription` method with example parameter values. ```JavaScript const { data } = await ClassicSubscriptionsApi.createSubscription({ universeId: 5795192361, name: "Cool Subscription", description: "Lorem ipsum dolor sit amet.", type: "Durable", price: "$7.99", }); ``` -------------------------------- ### Get Group Social Links (JavaScript Example) Source: https://cameronpcampbell.github.io/openblox/classic/groups/groupSocialLinks Demonstrates how to retrieve social links for a specific group using the `ClassicGroupsApi.groupSocialLinks` method in JavaScript. ```JavaScript const { rawBody: socials } = await ClassicGroupsApi.groupSocialLinks(5850082); ``` -------------------------------- ### Classic Catalog API: bundleInfo Example Response Data Source: https://cameronpcampbell.github.io/openblox/classic/catalog/bundleInfo Provides a sample JSON structure representing the typical data returned by the `bundleInfo` API, including detailed information about a bundle, its items, creator, and product details. ```JSON { "id": 429, "name": "Magma Fiend", "description": "He's got hot blood, with a temperature of nine hundred and three.", "bundleType": "BodyParts", "items": [ { "id": 2608534881, "name": "Magma Fiend - Left Arm", "type": "Asset" }, { "id": 2608536258, "name": "Magma Fiend - Left Leg", "type": "Asset" }, { "id": 2608537440, "name": "Magma Fiend - Right Arm", "type": "Asset" }, { "id": 2608538559, "name": "Magma Fiend - Right Leg", "type": "Asset" }, { "id": 2608539495, "name": "Magma Fiend - Torso", "type": "Asset" }, { "id": 2510230574, "name": "Rthro Climb", "type": "Asset" }, { "id": 2510233257, "name": "Rthro Fall", "type": "Asset" }, { "id": 2510235063, "name": "Rthro Idle", "type": "Asset" }, { "id": 2510236649, "name": "Rthro Jump", "type": "Asset" }, { "id": 2510238627, "name": "Rthro Run", "type": "Asset" }, { "id": 2510240941, "name": "Rthro Swim", "type": "Asset" }, { "id": 2510242378, "name": "Rthro Walk", "type": "Asset" }, { "id": 474312030, "name": "Magma Fiend", "type": "UserOutfit" }, { "id": 12726967427, "name": "Magma Fiend - Head", "type": "Asset" }, { "id": 11573370910, "name": "Anime - Mood", "type": "Asset" }, { "id": 23452425262, "name": "Magma Fiend Head", "type": "UserOutfit" } ], "creator": { "id": 1, "name": "Roblox", "type": "User", "hasVerifiedBadge": true }, "product": { "id": 7219806593957530, "type": "productType", "isPublicDomain": false, "isForSale": true, "priceInRobux": 300, "isFree": false, "noPriceText": null }, "collectibleItemDetail": { "collectibleItemId": "e036077b-ed8d-4bf1-9193-4e64bbc86978", "collectibleProductId": null, "price": 300, "lowestPrice": 300, "lowestResalePrice": 0, "totalQuantity": 0, "unitsAvailable": 0, "saleLocation": { "saleLocationType": "ShopAndAllExperiences", "saleLocationTypeId": 5, "universeIds": [], "enabledUniverseIds": [] }, "hasResellers": false, "saleStatus": "OnSale", "quantityLimitPerUser": null, "offSaleDeadline": null, "collectibleItemType": "NonLimited", "lowestAvailableResaleProductId": null, "lowestAvailableResaleItemInstanceId": null, "resaleRestriction": "Disabled" } } ``` -------------------------------- ### JavaScript Example for Creating Standard Datastore Snapshot Source: https://cameronpcampbell.github.io/openblox/cloud/standardDataStores_V2/createStandardDataStoreSnapshot Demonstrates how to call the "createStandardDataStoreSnapshot" API using JavaScript, showing the asynchronous call and parameter passing. ```JavaScript const { data: snapshot } = await StandardDataStoresApi_V2.createStandardDataStoreSnapshot({ universeId: 5097539509 }); ``` -------------------------------- ### JavaScript Example: Get Universe Playability Statuses Source: https://cameronpcampbell.github.io/openblox/classic/games/authedUserGamesPlayabilityStatuses Demonstrates how to use the ClassicGamesApi to fetch playability statuses for specified universe IDs using JavaScript. ```JavaScript const { data: playabilityStatuses } = await ClassicGamesApi.authedUserGamesPlayabilityStatuses({ universeIds: [1685831367], }); ``` -------------------------------- ### JavaScript Example: Fetching User Followings Source: https://cameronpcampbell.github.io/openblox/cloud/legacyFollowings/universeFollowingsForUser An example JavaScript code snippet demonstrating how to call the `LegacyFollowingsApi.universeFollowingsForUser` method using `async/await` to retrieve a user's followed universes. ```JavaScript const { data: followings } = await LegacyFollowingsApi.universeFollowingsForUser({ userId: 45348281 }); ``` -------------------------------- ### Example Data: Developer Products API Response Source: https://cameronpcampbell.github.io/openblox/classic/developerProducts/developerProductsForUniverse Presents a sample JSON array representing the typical response structure from the `developerProductsForUniverse` API. Each object in the array represents a developer product with properties like ID, name, description, shop ID, and icon image asset ID. ```JavaScript [ { id: 3616380, name: "Buy $100 CamperCoins", description: null, shopId: 1685930453, iconImageAssetId: 4922956503, }, { id: 3616418, name: "Buy $1000 CamperCoins", description: null, shopId: 1685930453, iconImageAssetId: 4922970743, }, { id: 3616413, name: "Buy $500 CamperCoins", description: null, shopId: 1685930453, iconImageAssetId: 4922969199, }, { id: 3616425, name: "CamperCoins", description: null, shopId: 1685930453, iconImageAssetId: 18760547825, }, { id: 3848620, name: "Starterpackk", description: null, shopId: 1685930453, iconImageAssetId: 5106354357, }, ] ``` -------------------------------- ### ClassicBadgesApi: Get User Badges JavaScript Example Source: https://cameronpcampbell.github.io/openblox/classic/badges/userBadges Illustrates how to programmatically fetch a user's badges using the `ClassicBadgesApi.userBadges` method in JavaScript. ```JavaScript const { data: badges } = await ClassicBadgesApi.userBadges({ userId: 45348281 }); ``` -------------------------------- ### JavaScript: Fetch Team Create Settings Example Source: https://cameronpcampbell.github.io/openblox/classic/develop/teamCreateSettingsForUniverses Example JavaScript code demonstrating how to call the `teamCreateSettingsForUniverses` API using `ClassicDevelopApi` to retrieve settings for specific universe IDs. ```JavaScript const { data: settings } = await ClassicDevelopApi.teamCreateSettingsForUniverses({ universeIds: [6069031486] }); ``` -------------------------------- ### Get Authenticated User Birthdate Source: https://cameronpcampbell.github.io/openblox/classic/users/authenticatedUserBirthdate Retrieves the birthdate for the currently authenticated user. This snippet includes a JavaScript example for usage and the corresponding API endpoint definition. ```JavaScript const { data: birthdate } = await ClassicUsersApi.authenticatedUserBirthdate(); ``` ```APIDOC Endpoint: GET /v1/birthdate ``` -------------------------------- ### Example: Publish Place File using ExperiencesApi in JavaScript Source: https://cameronpcampbell.github.io/openblox/cloud/experiences/publishPlace This JavaScript example demonstrates how to use the `ExperiencesApi.publishPlace` method to publish a place file. It shows how to pass the `universeId`, `placeId`, `versionType`, and `placeFile` parameters and destructure the response. ```JavaScript const { data: newVersion } = await ExperiencesApi.publishPlace({ universeId: 5795192361, placeId: 16866553538, versionType: "Published", placeFile: "./place.rbxlx" }); ``` -------------------------------- ### JavaScript Example: Get Group Join Request Info Source: https://cameronpcampbell.github.io/openblox/classic/groups/groupJoinRequestInfo Demonstrates how to use the ClassicGroupsApi to retrieve a join request for a specific group and user using JavaScript. ```JavaScript const { data: joinRequest } = await ClassicGroupsApi.groupJoinRequestInfo({ groupId: 5850082, userId: 2655994471 }); ``` -------------------------------- ### Example Data for universesProductInfo Response Source: https://cameronpcampbell.github.io/openblox/classic/games/universesProductInfo Illustrates the structure and content of the JSON data returned by the `universesProductInfo` API call, showing product details for a given universe ID. ```JSON { "1685831367": { isForSale: false, productId: 0, price: null, sellerId: 1536374574, }, } ``` -------------------------------- ### ClassicDevelopApi Endpoints Source: https://cameronpcampbell.github.io/openblox/classic/games/placeServerList Contains methods for development-related tasks such as managing universes, places, team create settings, plugins, and retrieving configuration and permissions. ```APIDOC gameTemplates groupUniverses teamCreateActiveMembers teamCreateSettingsForUniverse setTeamCreateSettingsForUniverse teamCreateSettingsForUniverses teamCreateRemoveUsersAccessForUniverse pluginsInfo updatePlugin universeInfo authenticatedUserPermissionsForUniverse universePlaces universesInfo authenticatedUserPermissionsForUniverses universeConfiguration updateUniverseConfiguration_V1 vipServerConfigurationForUniverse authenticatedUserGroupsCanManage authenticatedUserGroupsCanManageGamesOrItems authenticatedUserUniverses updatePlaceConfiguration_V1 placeConfiguration updatePlaceConfiguration_V2 updateUniverseConfiguration_V2 closeTeamTestSession ``` -------------------------------- ### JavaScript Example: Get Inactive Friends Source: https://cameronpcampbell.github.io/openblox/classic/friends/inactiveFriends Demonstrates how to call the `inactiveFriends` API using JavaScript to retrieve a list of inactive friends for a specified user ID. ```JavaScript const { data: inactive } = await ClassicFriendsApi.inactiveFriends({ userId: 45348281 }); ``` -------------------------------- ### Example Response: Subscription Price Tiers JSON Source: https://cameronpcampbell.github.io/openblox/classic/subscriptions/subscriptionsPriceTiersForUniverse An example of the JSON data structure returned by the `subscriptionsPriceTiersForUniverse` API, illustrating the mapping of UUIDs to subscription prices. ```JSON { "919c5912-7de8-413c-9756-d4265b3cbd3a": "$2.99", "c0516080-fc44-42a2-bc23-3c6dbfd0772d": "$4.99", "75c782ff-9d8b-4cf0-b3d8-64dd0ec4676a": "$7.99", "1adf5d0a-eabb-4d5d-a9e7-d9ab28dcb7c7": "$9.99", "790ff0ac-ef4b-490e-9b95-89f9249b8f51": "$14.99" } ``` -------------------------------- ### Sample Data Structure for Creator Experiences API Response Source: https://cameronpcampbell.github.io/openblox/classic/talent/creatorExperiences Provides an example of the data structure returned by the `creatorExperiences` API endpoint. It illustrates the fields for a single experience entry, including project details, creator information, and timestamps. ```JSON [ { "experienceId": 21126, "creatorUserId": 45348281, "createdUtc": "2022-01-16T16:09:30.161Z", "updatedUtc": "2022-07-29T12:23:28.866Z", "projectName": "RoCamping", "experienceDescription": "RoCamping was my first game, it was a survival game where you built a shelter and tried to survive. My role was the manage the project as well as script and create the UI .", "jobRole": "Programmer & UI Designer", "teamName": "", "experienceMedia": [], "experienceLinks": [ "[The Game](https://www.roblox.com/games/4922741943/RoCamping)" ], "teamId": null, "robloxExperienceIds": [], "robloxAssetIds": [], "startedUtc": "2020-03-31T23:00:00.000Z", "endedUtc": "2020-09-30T23:00:00.000Z", "isCurrent": false } ] ``` -------------------------------- ### JavaScript Example: Get User Bundle Favorite Source: https://cameronpcampbell.github.io/openblox/classic/catalog/authedUserGetBundleFavorite Demonstrates how to programmatically call the authedUserGetBundleFavorite API using JavaScript to retrieve a user's bundle favorite. ```JavaScript const { data: favorite } = await ClassicCatalogApi.authedUserGetBundleFavorite({ userId: 45348281, bundleId: 429 }); ``` -------------------------------- ### Example Response Data for bundlesThumbnails Source: https://cameronpcampbell.github.io/openblox/classic/thumbnails/bundlesThumbnails Illustrates the structure and content of the data returned by the bundlesThumbnails API call, showing the state and image URL for a bundle. ```json { "181": { "state": "Completed", "imageUrl": "https://tr.rbxcdn.com/12ff41b547ee75865bb60d0f3ae5508b/420/420/Avatar/Png" } } ``` -------------------------------- ### JavaScript Example: Get Authenticated User Asset Favorite Source: https://cameronpcampbell.github.io/openblox/classic/catalog/authedUserGetAssetFavorite Demonstrates how to call the authedUserGetAssetFavorite method using JavaScript to retrieve a user's favorite for a given asset. ```JavaScript const { data: favorite } = await ClassicCatalogApi.authedUserGetAssetFavorite({ userId: 45348281, assetId: 2608539495, }); ``` -------------------------------- ### JavaScript Example: Get Authenticated User Subscriptions Permissions Source: https://cameronpcampbell.github.io/openblox/classic/subscriptions/authenticatedUserSubscriptionsPermissionsForUniverse Illustrates how to call the authenticatedUserSubscriptionsPermissionsForUniverse method using JavaScript to retrieve subscription permissions for a given universe ID. ```JavaScript const { data: perms } = await ClassicSubscriptionsApi.authenticatedUserSubscriptionsPermissionsForUniverse({ universeId: 5795192361, }); ``` -------------------------------- ### ClassicDevelopApi Endpoints Source: https://cameronpcampbell.github.io/openblox/classic/develop/vipServerConfigurationForUniverse Contains methods for development-related tasks, including managing game templates, group universes, team create settings, plugins, and universe/place configurations. ```APIDOC ClassicDevelopApi: gameTemplates groupUniverses teamCreateActiveMembers teamCreateSettingsForUniverse setTeamCreateSettingsForUniverse teamCreateSettingsForUniverses teamCreateRemoveUsersAccessForUniverse pluginsInfo updatePlugin universeInfo authenticatedUserPermissionsForUniverse universePlaces universesInfo authenticatedUserPermissionsForUniverses universeConfiguration updateUniverseConfiguration_V1 vipServerConfigurationForUniverse authenticatedUserGroupsCanManage authenticatedUserGroupsCanManageGamesOrItems authenticatedUserUniverses updatePlaceConfiguration_V1 placeConfiguration updatePlaceConfiguration_V2 updateUniverseConfiguration_V2 closeTeamTestSession ``` -------------------------------- ### JavaScript Example: Get Group Payouts Info Source: https://cameronpcampbell.github.io/openblox/classic/groups/groupPayoutsInfo Demonstrates how to call the groupPayoutsInfo API using JavaScript to retrieve group payout percentages for a specific group ID. ```JavaScript const { data: payouts } = await ClassicGroupsApi.groupPayoutsInfo({ groupId: 5850082 }); ``` -------------------------------- ### Example Data: Updated Place Configuration Response Source: https://cameronpcampbell.github.io/openblox/classic/develop/updatePlaceConfiguration_V2 Provides a sample JSON response illustrating the data structure returned after a successful update of a place's configuration. ```JSON { id: 16349154726, universeId: 5638577595, name: "New name!", description: "", } ``` -------------------------------- ### Get Group Information (JavaScript Example) Source: https://cameronpcampbell.github.io/openblox/classic/groups/groupInfo Demonstrates how to programmatically retrieve group information using the `ClassicGroupsApi.groupInfo` method in JavaScript, showing a typical API call with a specific `groupId`. ```JavaScript const { data: groupInfo } = await ClassicGroupsApi.groupInfo({ groupId: 5850082 }); ``` -------------------------------- ### Example Response Data for Developer Product Creator Details Source: https://cameronpcampbell.github.io/openblox/classic/developerProducts/developerProductCreatorDetails Provides a sample JSON structure representing the data returned by the `developerProductCreatorDetails` API endpoint, showing typical fields and their values. ```JSON { "displayName": "Starterpackk", "displayDescription": null, "displayIconImageAssetId": 5106354357, "priceInformation": { "defaultPriceInRobux": 95, "isInActivePriceOptimizationExperiment": false }, "targetId": 3848620, "productType": "Developer Product", "assetId": 0, "productId": 995087849, "name": "Starterpackk", "description": null, "assetTypeId": 0, "creator": { "id": 0, "name": null, "creatorType": null, "creatorTargetId": 0 }, "iconImageAssetId": 5106354357, "created": "2020-05-29T11:49:09.08Z", "updated": "2024-07-22T05:33:16.827Z", "priceInRobux": null, "premiumPriceInRobux": null, "priceInTickets": null, "isNew": false, "isForSale": true, "isPublicDomain": false, "isLimited": false, "isLimitedUnique": false, "remaining": null, "sales": null, "minimumMembershipLevel": 0 } ``` -------------------------------- ### Get Authenticated User Friends Count Example (JavaScript) Source: https://cameronpcampbell.github.io/openblox/classic/friends/authenticatedUserFriendsCount Demonstrates how to retrieve the authenticated user's friends count by first fetching metadata using `ClassicFriendsApi.friendsMetadata()`. ```javascript const { data: metadata } = await ClassicFriendsApi.friendsMetadata(); ``` -------------------------------- ### JavaScript Example: Get Developer Product Creator Details Source: https://cameronpcampbell.github.io/openblox/classic/developerProducts/developerProductCreatorDetails Illustrates how to call the `developerProductCreatorDetails` API using JavaScript to retrieve information about a developer product's creator. ```JavaScript const { data: productCreatorDetails } = await ClassicDeveloperProductsApi.developerProductCreatorDetails({ developerProductProductId: 995087849, }); ``` -------------------------------- ### JSON: Example Response Data for Developer Product Thumbnails Source: https://cameronpcampbell.github.io/openblox/classic/thumbnails/developerProductsThumbnails Provides a sample JSON object representing the typical successful response from the `developerProductsThumbnails` API. It illustrates the structure, including `state` and `imageUrl` for a given product ID. ```JSON { "3616425": { state: "Completed", imageUrl: "https://tr.rbxcdn.com/3e495c43b44b85cd3dd1afee9df3636b/420/420/Image/Png", }, } ``` -------------------------------- ### JavaScript: Fetch Universe Media Example Source: https://cameronpcampbell.github.io/openblox/classic/games/universeMedia Demonstrates how to call the `universeMedia` API using JavaScript to retrieve media data for a given universe ID using the ClassicGamesApi. ```JavaScript const { data: media } = await ClassicGamesApi.universeMedia({ universeId: 1685831367 }); ``` -------------------------------- ### JavaScript Example: Get Badge Award Date for User Source: https://cameronpcampbell.github.io/openblox/classic/badges/badgeAwardedDateForUser Demonstrates how to call the `badgeAwardedDateForUser` API using JavaScript to retrieve the award date for a specific badge and user. ```JavaScript const { data: awardDate } = await ClassicBadgesApi.badgeAwardedDateForUser({ badgeId: 2124533401, userId: 45348281 }); ``` -------------------------------- ### Retrieve Authenticated User Age Bracket (JavaScript) Source: https://cameronpcampbell.github.io/openblox/classic/users/authenticatedUserAgeBracket Example JavaScript code demonstrating how to call the `authenticatedUserAgeBracket` method from the `ClassicUsersApi` to get the current user's age bracket. ```javascript const { data: ageBracket } = await ClassicUsersApi.authenticatedUserAgeBracket(); ``` -------------------------------- ### Example Usage of creatorStoreProductInfo API Source: https://cameronpcampbell.github.io/openblox/cloud/creatorStore/creatorStoreProductInfo Demonstrates how to call the creatorStoreProductInfo API using JavaScript to retrieve product information for a given model asset ID. ```JavaScript const { data: productInfo } = await CreatorStoreApi.creatorStoreProductInfo({ modelAssetId: 16989381169 }); ``` -------------------------------- ### JavaScript Example: Fetching Developer Products Source: https://cameronpcampbell.github.io/openblox/classic/developerProducts/developerProductsForUniverse Illustrates how to use the `ClassicDeveloperProductsApi` in JavaScript to fetch developer products for a given `universeId`. This snippet demonstrates a typical asynchronous API call. ```JavaScript const { data: products } = await ClassicDeveloperProductsApi.developerProductsForUniverse({ universeId: 1685831367 }); ``` -------------------------------- ### JavaScript: Call developerProductsThumbnails API Example Source: https://cameronpcampbell.github.io/openblox/classic/thumbnails/developerProductsThumbnails Demonstrates how to make an asynchronous call to the `developerProductsThumbnails` API using JavaScript. It shows how to pass `developerProductIds` and destructure the response to get the `data`. ```JavaScript const { data: developerProductsThumbnails } = await ClassicThumbnailsApi.developerProductsThumbnails({ developerProductIds: [3616425], }); ```