Initialize the JavaScript SDK
Install the SDK
Install the Jupiter JavaScript SDK in your project using npm.
npm install @jupiter-cloud/sdkInitialize the client library
- Base URL
- The base URL is always https://api.jupitercloud.co. It is the address of the managed backend API for all requests.
- Project ID
- The Project ID is needed to identify the project you are targeting. It can be found under Project Overview in the dashboard.
- Admin Secret
- You can pass the admin secret to access specific admin-only functions, such as bucket management or Auth admin actions. It must be minted by a Super Admin in the team dashboard. The SDK should never be initialized with admin credentials on the frontend. Normally, Jupiter automatically attaches the access token of an authenticated user to all Storage and Auth requests. When the SDK is initialized with the admin secret, the secret is attached automatically.
import { Jupiter } from '@jupiter-cloud/sdk' const client = new Jupiter( 'https://api.jupitercloud.co', 'project-id', 'optional-admin-secret')