Overview: How to Get Started
⚡ 5 min readSet up your Transcodes organization and project to get started
Integration Processes
Create Your Organization
Go to Transcodes Dashboard and sign in or create an account. As long as you create an account, you will be given an organizaiton automatically.
Create New Project
- Click “Create New Project”
- Enter project details:
- Project Name *: A name to identify your project (required, max 100 characters)
- Project Description: A brief description of your project (optional, max 200 characters)
Copy Project ID and Import CDN Script
After creation, copy your Project ID (e.g., proj_abc123xyz). You’ll need this to initialize the SDK.
Organization vs Project
- Organization: Your company account (can have multiple projects)
- Project: A single app/website (has one Project ID)
Use the Project ID in your code, not the Organization ID.
Login, Console, and MFA Components
After CDN script is added, you can trigger the login, console, and mfa modals with one function call. For more detailed params, please visit Modal API page
// Trigger sign-in or registration modal with one function call
const result = await transcodes.openAuthLoginModal();// Trigger account management modal with one function call
const result = await transcodes.openAuthModal();// Trigger multi-factor authentication modal with one function call
const result = await transcodes.openAuthMfaModal();Listen for Authentication State Changes
Once login is successful, you can listen for authentication state changes with the following event:
transcodes.on('AUTH_STATE_CHANGED', (payload) => {
console.log('Auth state:', payload.isAuthenticated);
});For more detailed events, please visit Events API page
Server-side Integration
If you need to integrate with your backend, you can get the user’s token from Transcodes:
Include the token in your API requests:
async function checkAuth() {
// Check authentication status
const isAuth = await transcodes.token.isAuthenticated();
if (!isAuth) {
console.log('Not authenticated');
return null;
}
// Get access token for API calls
const token = await transcodes.token.getAccessToken();
console.log('Access token available:', !!token);
return token;
}const response = await fetch('/api/protected', {
headers: {
Authorization: `Bearer ${token}`,
},
});Production Checklist
Before going live:
- Add your domain in the Transcodes Dashboard
- Use HTTPS — WebAuthn requires secure contexts
- Set up CSP if needed:
script-src https://cdn.transcodes.link
connect-src https://api.transcodes.io
frame-src https://auth.transcodes.io
The SDK only works on domains you’ve authorized in the dashboard.
TypeScript Support
Full TypeScript Support: We provide complete type definitions for the Transcodes SDK. Download the type definition file and add it to your project for autocomplete and type checking—no npm package required.
How to use:
- Download the type definition file to your project:
curl -o transcodes.d.ts https://cdn.transcodes.link/types/transcodes.d.ts- The
transcodesglobal will now have full IntelliSense support in your IDE.
What’s Next
Ready to get started! Next step: - Step 1: Create Your Organization - Set up your Transcodes account