Learn how RoZod handles Roblox authentication automatically with comprehensive security features
RoZod provides automatic authentication handling for both browser and server environments, with support for multiple Roblox accounts, cookie rotation, and advanced security features.
In browser environments, authentication works automatically when users are logged into Roblox:
import { fetchApi } from 'rozod';import { getUsersUserdetails } from 'rozod/lib/endpoints/usersv1';// Cookies are sent automatically - no setup required!const userInfo = await fetchApi(getUsersUserdetails, { userIds: [123456] });
No configuration is needed in browsers. RoZod automatically includes cookies from the user’s active Roblox session.
For Node.js, Bun, or Deno environments, configure authentication once at startup:
import { configureServer, fetchApi } from 'rozod';import { getUsersUserdetails } from 'rozod/lib/endpoints/usersv1';// Configure once at startupconfigureServer({ cookies: 'your_roblosecurity_cookie_here' });// All subsequent requests automatically include the cookieconst userInfo = await fetchApi(getUsersUserdetails, { userIds: [123456] });
Never commit .ROBLOSECURITY cookies to version control. Always use environment variables or secure secret management.
RoZod provides utilities to manage your server configuration:
import { configureServer, clearServerConfig, getServerConfig } from 'rozod';// Check current configurationconst config = getServerConfig();console.log(config.cookies, config.cloudKey);// Clear all server configurationclearServerConfig();