A lightweight, type-safe TypeScript SDK for interacting with the Roblox Open Cloud API. Zero dependencies, built-in retry logic, and full TypeScript support.
npm install @relatiohq/opencloud
# or
pnpm add @relatiohq/opencloud
# or
yarn add @relatiohq/opencloudimport { OpenCloud } from "@relatiohq/opencloud";
// With API key authentication
const client = new OpenCloud({
apiKey: "your-api-key",
});
const user = await client.users.get("123456789");Perfect for multi-tenant applications:
// Create client without default auth
const client = new OpenCloud();
// Use different credentials per request
const userClient = client.withAuth({
kind: "oauth2",
accessToken: "user-access-token",
});
const groups = await userClient.groups.listGroupMemberships("123456");Full API documentation is available at https://opencloud.relatio.cc
- Type-safe API client
- Built with modern TypeScript
- Tree-shakeable exports
- Lightweight with zero dependencies
- Automatic retry with exponential backoff
- Flexible authentication
Without SDK:
// Manual fetch with error handling, retries, rate limiting...
const response = await fetch(
`https://apis.roblox.com/cloud/v2/users/${userId}`,
{
headers: { "x-api-key": apiKey },
},
);
if (!response.ok) {
// Handle errors manually
throw new Error(`API error: ${response.status}`);
}
const data = await response.json();
// No type safety, no automatic retriesWith SDK:
// Type-safe, automatic retries, built-in error handling
const user = await client.users.get(userId);
// Full TypeScript autocomplete and type checkingSecurity is a top priority. Please review our Security Policy for:
- Supported versions
- How to report vulnerabilities
- Security best practices for API key management
- Safe usage guidelines
Never commit API keys to version control! Always use environment variables or secure secret management.
Contributions are welcome! Please read our contributing guide to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.
This project is built with:
- TypeScript - Type-safe JavaScript
- tsup - Fast TypeScript bundler
- Vitest - Lightning fast unit testing
- TypeDoc - Documentation generation
Special thanks to:
- The Roblox team for providing the Open Cloud API
- All contributors who help improve this SDK
- The TypeScript community for excellent tooling
MIT © Relatio
Note: This is an unofficial SDK and is not affiliated with, endorsed by, or sponsored by Roblox Corporation.