Setting the file. One moment.
Subchapter 106.4
references/authorization-official.mdMarkdown2 KBView on GitHub
Both customers and agents require JWTs for authentication. Generate tokens server-side.
{
"alg": "HS256",
"typ": "JWT"
}| Claim | Type | Description |
|---|---|---|
user_id | string | Unique user identifier |
app_key | string | Your SDK Key |
role_type | number | 1 = customer, 2 = agent |
user_name | string | Display name |
iat | number | Issued at timestamp |
exp | number | Expiration timestamp |
Cobrowse token validation is strict. Use these claim names exactly:
user_id (not user_identity)app_keyrole_typeuser_nameiatexpAvoid adding unrecognized custom claims unless Zoom docs explicitly support them for your SDK version.
If you see Invalid token (code 124), validate claim names first.
| Role | Value | Description |
|---|---|---|
| Customer | 1 | User sharing their browser |
| Agent | 2 | Support staff viewing session |
const customerPayload = {
user_id: "customer_123",
app_key: "YOUR_SDK_KEY",
role_type: 1,
user_name: "John Customer",
iat: Math.floor(Date.now() / 1000),
exp: Math.floor(Date.now() / 1000) + 3600
};
const token = jwt.sign(customerPayload, SDK_SECRET, { algorithm: 'HS256' });const agentPayload = {
user_id: "agent_456",
app_key: "YOUR_SDK_KEY",
role_type: 2,
user_name: "Support Agent",
iat: Math.floor(Date.now() / 1000),
exp: Math.floor(Date.now() / 1000) + 3600
};
const token = jwt.sign(agentPayload, SDK_SECRET, { algorithm: 'HS256' });