Overview
The Unpod SDK needs an access token to connect to the server successfully. This token holds the participant’s identity, room name, capabilities, and permissions. Tokens are signed with your API secret to block forgery, and include an expiration time after which the server rejects them.Expiration time only impacts the initial connection, and not subsequent reconnects.
Authentication Method
The Unpod API uses API Key Authentication:| Header | Format | Example |
|---|---|---|
| Authorization | Token <token> | Authorization: Token a1b2c3d4e5f6g7h8i9j0... |
How to Get Your API Token
Follow these steps to obtain your API token from the Unpod Dashboard:- Login to the Unpod Dashboard
- After login, you’ll be redirected to the Hub page
- On the left sidebar, click on the Key icon (Api Keys)
- You’ll be redirected to the API Keys page
- Click Generate New API Key
- Copy and securely store your API token
If you delete an API key, you can always generate a new one from the API Keys page.
Required Headers
Depending on the endpoint, you may need additional headers:| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Token <your-api-token> |
| Org-Handle | string | Sometimes | Organization domain handle |
| Product-ID | string | Sometimes | Product identifier |
| Content-Type | string | For POST/PATCH | application/json |
Example Request
Code Examples
Error Responses
401 - Unauthorized
Returned when authentication credentials are missing or invalid.403 - Forbidden
Returned when the token is expired or access is denied.400 - Bad Request
Returned when required headers are missing.Best Practices
- Secure Storage: Never expose your API tokens in client-side code or public repositories
- HTTPS Only: Always use HTTPS for all API requests
- Header Validation: Always include required headers (Org-Handle, Product-ID) where needed
- Error Handling: Implement proper error handling for authentication failures
- Rotation: Rotate API tokens periodically for enhanced security