Give each of your users their own private template library within your embedded Orshot instance. Users can save, edit, and manage templates that only they can see.
userId parameter when loading the embed| Parameter | Required | Description |
|---|---|---|
userId | Yes | Unique identifier for the user (from your app) |
userName | No | Display name for the user |
userEmail | No | Email address for the user |
metadata | No | JSON string with custom user data |
Add the userId parameter to your embed URL:
<iframe
src="https://orshot.com/embeds/YOUR_EMBED_ID?userId=user_123"
width="100%"
height="700"
allow="clipboard-write; clipboard-read"
/>Include optional user information:
<iframe
src="https://orshot.com/embeds/YOUR_EMBED_ID?userId=user_123&userName=John%20Doe&userEmail=john@example.com"
width="100%"
height="700"
allow="clipboard-write; clipboard-read"
/>Pass additional data as a JSON string:
const metadata = JSON.stringify({
plan: "pro",
company: "Acme Inc",
role: "designer",
});
const embedUrl = `https://orshot.com/embeds/YOUR_EMBED_ID?userId=user_123&metadata=${encodeURIComponent(
metadata
)}`;function DesignEditor({ user }) {
const params = new URLSearchParams({
userId: user.id,
userName: user.name,
userEmail: user.email,
});
return (
<iframe
src={`https://orshot.com/embeds/YOUR_EMBED_ID?${params}`}
width="100%"
height="700"
allow="clipboard-write; clipboard-read"
/>
);
}userId must be unique per user in your systemuserId parameter, templates save to the workspace (shared)userIdYou can retrieve templates for a specific embed user using the Studio Templates API. Pass both embedId and embedUserId parameters to filter templates.
await fetch(
"https://api.orshot.com/v1/studio/templates/all?embedId=YOUR_EMBED_ID&embedUserId=user_123",
{
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <ORSHOT_API_KEY>",
},
}
);| Parameter | Type | Required | Description |
|---|---|---|---|
embedId | String | Yes* | Your embed instance ID |
embedUserId | String | Yes* | The user ID (same as userId in embed URL) |
*Both parameters are required together for user-specific filtering.
Returns only templates belonging to that specific user:
{
"data": [
{
"id": 456,
"name": "User's Custom Template",
"embed_user_id": "eui_a1B2c3D4e5F6g7H8",
"thumbnail_url": "https://storage.orshot.com/thumbnails/template-456.png",
...
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 3,
"totalPages": 1
}
}The embed_user_id in the response is a hashed internal ID (format: eui_ +
16 characters). Your original userId is never exposed.
