el4cteo/roblox-skills

roblox-open-cloud

Open Cloud REST APIs and HttpService - API keys/OAuth, v2 patterns, data/memory stores from outside, publishMessage, place publishing, server restarts, Luau execution, bans, configs/experiments, notifications, webhooks with roblox-signature verification, ra…

查看源码
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Roblox Open Cloud and HttpService

Base URL: https://apis.roblox.com. Prefer Open Cloud endpoints (API key or OAuth 2.0, stable). Legacy cookie-authenticated *.roblox.com web APIs can break without notice — don't build on them.

Authentication

  • API keys (Creator Dashboard → Open Cloud → API Keys): for your own/your group's resources and

automation. Grant the minimum scopes per universe, set an IP allowlist (CIDR) and expiration, store as a secret (CI secret, vault), send as header x-api-key: <key>. Group-owned resources need a key created under the group. Introspect a key with POST /api-keys/v1/introspect.

  • OAuth 2.0 (authorization code + PKCE): apps acting on behalf of other users (third-party tools).
  • Never ship keys in game scripts, attributes, or client code.

Common endpoints (v2 unless noted)

TaskEndpoint
Data store entriesGET/POST /cloud/v2/universes/{u}/data-stores/{ds}/entries, GET/PATCH/DELETE .../entries/{id}, :increment, :listRevisions; scopes via /scopes/{scope}/entries
Ordered data stores/cloud/v2/universes/{u}/ordered-data-stores/{ods}/scopes/{scope}/entries[...]
Memory stores/cloud/v2/universes/{u}/memory-store/sorted-maps/{map}/items, `/queues/{q}/items[:read:discard], memory-store:flush`
Cross-server message into live serversPOST /cloud/v2/universes/{u}:publishMessage { "topic": "...", "message": "..." }
Publish a place file`POST /universes/v1/{u}/places/{p}/versions?versionType=PublishedSaved (body: .rbxl`)
Restart servers (after an update)POST /cloud/v2/universes/{u}:restartServers
Run Luau in a cloud serverPOST /cloud/v2/universes/{u}/places/{p}[/versions/{v}]/luau-execution-session-tasks
BansPATCH /cloud/v2/universes/{u}/user-restrictions/{userId}?updateMask=gameJoinRestriction (scope universe.user-restriction:write), user-restrictions:listLogs
Experience notificationsPOST /cloud/v2/users/{userId}/notifications
Secrets store/cloud/v2/universes/{u}/secrets
Configs / experiments`/creator-configs-public-api/v1/configs/universes/{u}/repositories/{repo}[/draft/publish], /experimentation/...`
Universe/place settingsGET/PATCH /cloud/v2/universes/{u}, /cloud/v2/universes/{u}/places/{p}
Assets, badges, game passes, developer products, groups, users, inventorySee the Open Cloud reference by feature.

The authoritative list with scopes and per-endpoint rate limits is the Open Cloud reference (create.roblox.com/docs/cloud/reference) and its OpenAPI description — check it before writing a client.

Patterns

  • Pagination: pass maxPageSize; follow nextPageToken → pageToken until empty.
  • Long-running operations: some calls return an operation path; poll GET /cloud/v2/{path} until done.
  • Filtering: filter query parameter on list endpoints that support it.
  • Rate limits: read the x-ratelimit-* response headers; on 429, back off exponentially with jitter.

Data store budgets are shared between Open Cloud and live game servers — throttle bulk scripts so they don't starve the game (see roblox-data-stores).

  • Errors: JSON { code, message }; retry only 429 and 5xx.
bash
# Read one player's data store entry
curl -s "https://apis.roblox.com/cloud/v2/universes/$UNIVERSE_ID/data-stores/PlayerData/entries/User_$USER_ID" \
  -H "x-api-key: $ROBLOX_API_KEY"

# Announce to all live servers (the game subscribes to the "Announcements" topic)
curl -s -X POST "https://apis.roblox.com/cloud/v2/universes/$UNIVERSE_ID:publishMessage" \
  -H "x-api-key: $ROBLOX_API_KEY" -H "Content-Type: application/json" \
  -d '{"topic":"Announcements","message":"{\"text\":\"Update in 5 minutes\"}"}'

HttpService inside games

  • Enable Allow HTTP Requests (Experience Settings → Security). Server-side only.
  • Limits: 500 requests/min per server for external URLs; Open Cloud calls have a separate

2,500/min per server budget. Always pcall; handle non-2xx (response.Success).

  • Store keys in the experience Secrets store (Creator Hub) and read with HttpService:GetSecret(name),

which returns an opaque Secret usable in headers (and AddPrefix/AddSuffix), not a readable string.

  • Only a subset of Open Cloud endpoints can be called from games (assets, bans, configs, data/memory

stores, messaging, notifications, and more — check the in-game HTTP docs list). Calls to other roblox.com domains are blocked.

luau
--!strict
local HttpService = game:GetService("HttpService")

local function postToWebhook(url: string, payload: { [string]: any }): boolean
	local ok, response = pcall(function()
		return HttpService:RequestAsync({
			Url = url,
			Method = "POST",
			Headers = { ["Content-Type"] = "application/json" },
			Body = HttpService:JSONEncode(payload),
		})
	end)
	if not ok then
		warn("HTTP request failed to send:", response)
		return false
	end
	if not response.Success then
		warn(`HTTP {response.StatusCode}: {response.StatusMessage}`)
	end
	return response.Success
end

local function banViaOpenCloud(universeId: number, userId: number, reason: string): boolean
	local ok, response = pcall(function()
		return HttpService:RequestAsync({
			Url = `https://apis.roblox.com/cloud/v2/universes/{universeId}/user-restrictions/{userId}?updateMask=gameJoinRestriction`,
			Method = "PATCH",
			Headers = {
				["Content-Type"] = "application/json",
				["x-api-key"] = HttpService:GetSecret("OpenCloudKey"),
			},
			Body = HttpService:JSONEncode({
				gameJoinRestriction = { active = true, displayReason = reason, privateReason = reason },
			}),
		})
	end)
	return ok and response.Success
end

return { postToWebhook = postToWebhook, banViaOpenCloud = banViaOpenCloud }

In-game, prefer native APIs (Players:BanAsync, DataStoreService) over calling Open Cloud for the same thing. Never log or send player chat/PII to third parties without a legitimate purpose and compliance review.

Webhooks (Roblox → your server)

Configure in Creator Dashboard → Webhooks. Triggers: subscription purchased/renewed/cancelled/refunded/ resubscribed, right-to-erasure requests, commerce order paid/refunded, transaction refunded. Verification details and a Node/Python verifier: references/webhooks.md.

Related skills

roblox-data-stores (budgets, schema), roblox-tooling (CI publishing), roblox-testing (Luau execution tests), roblox-analytics-liveops (configs, experiments), roblox-security (bans, secrets).

来自同一仓库

更多 Skills

全部 Skills
el4cteo
社区

roblox-security

Anti-exploit design - never trust the client, validate every remote argument (NaN, spoofed instances, strings), rate limiting, ProximityPrompt/ClickDetector abuse, network ownership, movement and hit validation, economy/trade duplication, code confidentiality, secure teleports, heuristics, Ban API. Use when writing server handlers for client input, combat/economy/trading, or reviewing for exploits.

安装量
2
GitHub Stars
29
最近更新
9月28日
el4cteo
社区

roblox-analytics-liveops

Analytics and live ops - AnalyticsService economy/funnel/onboarding/progression/custom events, player segments, experience configs via ConfigService, A/B experiments, badges, experience notifications, timed events, daily rewards, season passes. Use when instrumenting a game, tuning economy or onboarding, running A/B tests or feature flags, or planning live events and re-engagement.

安装量
2
GitHub Stars
29
最近更新
9月28日
el4cteo
社区

roblox-architecture

Roblox project structure and client/server model - replication, where code and assets belong (ServerScriptService, ReplicatedStorage, StarterPlayer), RunContext, service/controller bootstrapping, player/character lifecycle, CollectionService components, attributes, streaming-safe client code, library choices. Use when starting a project, deciding where code goes, or fixing replication/streaming bugs.

安装量
2
GitHub Stars
29
最近更新
9月28日
el4cteo
社区

roblox-audio

Sound and music - the Audio API (AudioPlayer, AudioEmitter, AudioListener, AudioDeviceOutput, Wire, effects, faders), classic Sound/SoundGroup, 2D vs 3D audio, music and SFX volume, client vs server playback, asset permissions, streaming caveats, voice routing, text-to-speech. Use when adding music, sound effects, spatial audio, mixing, or fixing sounds that don't play.

安装量
2
GitHub Stars
29
最近更新
9月28日