Complete HTTP API documentation for Clipboard Bridge.
http://YOUR_PC_IP:5678
Default port: 5678
X-Auth-Token: your-token-here?token=your-token-hereIf no token is configured, authentication is disabled.
Get clipboard content from PC.
Request:
GET /pull HTTP/1.1
Host: 192.168.1.100:5678
X-Auth-Token: your-tokenResponse:
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Hello World
Example (curl):
curl -H "X-Auth-Token: your-token" \
http://192.168.1.100:5678/pullSet clipboard content on PC.
Method 1: Form Data
POST /push HTTP/1.1
Host: 192.168.1.100:5678
X-Auth-Token: your-token
Content-Type: application/x-www-form-urlencoded
text=Hello+WorldMethod 2: Raw Body
POST /push HTTP/1.1
Host: 192.168.1.100:5678
X-Auth-Token: your-token
Hello WorldResponse:
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
OK
Example (curl):
# Form data
curl -X POST \
-H "X-Auth-Token: your-token" \
-d "text=Hello World" \
http://192.168.1.100:5678/push
# Raw body
curl -X POST \
-H "X-Auth-Token: your-token" \
--data-binary "Hello World" \
http://192.168.1.100:5678/pushGet clipboard metadata (content + timestamp).
Request:
GET /meta HTTP/1.1
Host: 192.168.1.100:5678
X-Auth-Token: your-tokenResponse:
{
"text": "Hello World",
"updated": 1733400000
}text: Clipboard contentupdated: Unix timestamp (seconds)
Example (curl):
curl -H "X-Auth-Token: your-token" \
http://192.168.1.100:5678/metaWait for clipboard updates (long polling).
Query parameters:
since: Unix timestamp (seconds), last knownupdatedvaluetimeout: seconds (default25, max30)
Response:
{
"text": "Hello World",
"updated": 1733400000
}- If no update happens before timeout, returns
{ "text": "", "updated": <current> }.
Example (curl):
curl -H "X-Auth-Token: your-token" \
"http://192.168.1.100:5678/wait?since=1733400000&timeout=25"Health check endpoint.
Request:
GET /ping HTTP/1.1
Host: 192.168.1.100:5678
X-Auth-Token: your-tokenResponse:
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
PONG
Example (curl):
curl -H "X-Auth-Token: your-token" \
http://192.168.1.100:5678/pingToken verification failed.
HTTP/1.1 401 Unauthorized
Content-Type: text/plain; charset=utf-8
Unauthorized
Invalid request body.
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
Failed to read request body
Server error (e.g., clipboard access failed).
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
Failed to write clipboard: [error details]
- Request Body Size: 10 MB maximum
- Timeouts:
- Read: 30 seconds
- Write: 30 seconds
- Idle: 120 seconds
import requests
BASE_URL = "http://192.168.1.100:5678"
TOKEN = "your-token"
headers = {"X-Auth-Token": TOKEN}
# Pull from PC
text = requests.get(f"{BASE_URL}/pull", headers=headers).text
# Push to PC
requests.post(f"{BASE_URL}/push", data={"text": "Hello"}, headers=headers)
# Get metadata
meta = requests.get(f"{BASE_URL}/meta", headers=headers).json()
print(f"Text: {meta['text']}, Updated: {meta['updated']}")const axios = require('axios');
const BASE_URL = 'http://192.168.1.100:5678';
const headers = { 'X-Auth-Token': 'your-token' };
// Pull from PC
const text = await axios.get(`${BASE_URL}/pull`, { headers });
// Push to PC
await axios.post(`${BASE_URL}/push`,
new URLSearchParams({ text: 'Hello' }),
{ headers }
);
// Get metadata
const meta = await axios.get(`${BASE_URL}/meta`, { headers });
console.log(meta.data);$baseUrl = "http://192.168.1.100:5678"
$headers = @{ "X-Auth-Token" = "your-token" }
# Pull from PC
$text = Invoke-RestMethod -Uri "$baseUrl/pull" -Headers $headers
# Push to PC
$body = @{ text = "Hello World" }
Invoke-RestMethod -Uri "$baseUrl/push" -Method Post -Body $body -Headers $headers
# Get metadata
$meta = Invoke-RestMethod -Uri "$baseUrl/meta" -Headers $headersBack to: Documentation Index