Skip to main content

API Key

All Xshot API requests require an API key. You can pass it in three ways:

Query String

Best for quick testing in the browser.
Recommended for production applications.

Bearer Token

Standard OAuth-style bearer authentication.

WebSocket Authentication

For WebSocket connections, pass the API key as a query parameter:
Connections without a valid key are immediately closed with code 4001.

Unauthenticated Request

Response (401):

Code Examples

WebSocket Authentication Example