Returns the HTML documentation page.
{ "content-type": "text/html" }api.theomnix.net
Request parameters, cookies, and response shapes for every available endpoint.
/docsHuman-readable API documentation page for all endpoints.
No request params are required.
Returns the HTML documentation page.
{ "content-type": "text/html" }/api/healthReturns runtime status, environment, and domain metadata.
No request params are required.
Health check succeeded.
{
"ok": true,
"service": "Omnix API",
"domain": "api.theomnix.net",
"environment": "production",
"timestamp": "2026-03-25T12:00:00.000Z"
}/api/contactValidates and accepts a contact form submission.
body | string | required
Contact name, 2 to 100 characters.
body | string | required
Valid email address.
body | string | optional
Optional company name up to 120 characters.
body | string | required
Message body, 10 to 2000 characters.
Submission accepted.
{
"ok": true,
"message": "Contact request accepted.",
"domain": "api.theomnix.net",
"submission": {
"name": "Jane Doe",
"email": "jane@example.com",
"company": "Omnix",
"message": "Tell me more about your platform.",
"receivedAt": "2026-03-25T12:00:00.000Z"
}
}Validation failed.
{
"ok": false,
"error": {
"message": "Validation failed.",
"details": {
"fieldErrors": {
"email": ["Invalid email address"]
}
}
}
}/auth/tiktok/startStarts TikTok OAuth and redirects the user to TikTok.
query | string | optional
Optional override for the configured TikTok OAuth scope.
Redirects to the TikTok authorization URL.
Location: https://www.tiktok.com/v2/auth/authorize/?client_key=...&redirect_uri=...&scope=user.info.basic,user.info.profile,video.publish&state=...OAuth environment is missing or invalid.
{
"error": "Server configuration error"
}/auth/tiktok/callbackValidates the state, exchanges the code for tokens, stores them temporarily, and redirects to the frontend completion page.
query | string | required
Authorization code returned by TikTok after consent.
query | string | required
CSRF state value that must match the HttpOnly cookie.
query | string | optional
OAuth error returned by TikTok if the user denies consent.
query | string | optional
Optional TikTok error detail.
cookie | string | required
HttpOnly cookie containing the original OAuth state.
Redirects to the frontend completion page on success.
Location: http://localhost:3000/auth/complete?provider=tiktok&status=success&open_id=...&username=...&display_name=...&avatar_url=...&granted_scopes=user.info.basic,user.info.profile,video.publish&can_post=trueRedirects to the frontend completion page on failure.
Location: http://localhost:3000/auth/complete?provider=tiktok&status=error&reason=invalid_state/auth/tiktok/sessionReturns the temporarily stored TikTok session, granted scopes, and fetched user profile for a given open_id.
query | string | required
TikTok open_id returned after a successful callback.
Stored TikTok session found.
{
"ok": true,
"open_id": "afd97af1-b87b-48b9-ac98-410aghda5344",
"scope": "user.info.basic,user.info.profile,video.publish",
"can_post": true,
"expires_in": 86400,
"received_at": "2026-03-25T12:00:00.000Z",
"profile": {
"open_id": "afd97af1-b87b-48b9-ac98-410aghda5344",
"display_name": "TikTok Creator",
"username": "creator_handle",
"avatar_url": "https://...",
"profile_deep_link": "https://www.tiktok.com/@creator_handle"
}
}Session not found in the temporary in-memory store.
{
"ok": false,
"error": "No TikTok session found for the provided open_id."
}/auth/youtube/startStarts Google OAuth for YouTube Data API access using the youtube.readonly and youtube.upload scopes by default.
query | string | optional
Optional override for the configured Google OAuth scopes. Google expects scopes to be space-delimited.
Redirects to Google consent for YouTube authorization.
Location: https://accounts.google.com/o/oauth2/v2/auth?client_id=...&redirect_uri=https://api.theomnix.net/auth/youtube/callback&response_type=code&scope=https://www.googleapis.com/auth/youtube.readonly%20https://www.googleapis.com/auth/youtube.upload&access_type=offline&include_granted_scopes=true&prompt=consent&state=.../auth/youtube/callbackValidates the OAuth state, exchanges the Google authorization code for YouTube tokens, fetches the authenticated channel, stores the session temporarily, and redirects to the frontend completion page.
query | string | required
Authorization code returned by Google after consent.
query | string | required
CSRF state value that must match the HttpOnly cookie.
query | string | optional
OAuth error returned by Google if the user denies consent.
query | string | optional
Optional Google error detail.
cookie | string | required
HttpOnly cookie containing the original OAuth state.
Redirects to the frontend completion page on success.
Location: http://localhost:3000/auth/complete?provider=youtube&status=success&channel_id=UC...&channel_title=Omnix&custom_url=@omnix&granted_scopes=https://www.googleapis.com/auth/youtube.readonly%20https://www.googleapis.com/auth/youtube.upload&can_read=true&can_upload=trueRedirects to the frontend completion page on failure.
Location: http://localhost:3000/auth/complete?provider=youtube&status=error&reason=invalid_state/auth/youtube/sessionReturns the temporarily stored YouTube session, granted scopes, and cached authenticated channel for a given channel_id.
query | string | required
YouTube channel ID returned after a successful callback.
Stored YouTube session found.
{
"ok": true,
"channel_id": "UC1234567890",
"scope": "https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtube.upload",
"can_read": true,
"can_upload": true,
"expires_in": 3599,
"received_at": "2026-03-25T12:00:00.000Z",
"channel": {
"id": "UC1234567890",
"title": "Omnix",
"custom_url": "@omnix",
"thumbnail_url": "https://yt3.googleusercontent.com/...",
"uploads_playlist_id": "UU1234567890"
}
}Session not found in the temporary in-memory store.
{
"ok": false,
"error": "No YouTube session found for the provided channel_id."
}/api/youtube/channelFetches the authenticated user's current YouTube channel using the stored server-side access token and the youtube.readonly scope.
query | string | required
Channel ID used to look up the stored server-side OAuth session.
Fresh channel data returned from channels.list?mine=true.
{
"ok": true,
"channel": {
"id": "UC1234567890",
"title": "Omnix",
"subscriber_count": "1500",
"video_count": "42",
"view_count": "98765",
"privacy_status": "public",
"long_uploads_status": "allowed"
}
}Stored session is missing the required readonly scope.
{
"ok": false,
"error": "The stored YouTube session is missing the youtube.readonly scope."
}/api/youtube/videos/uploadUploads a video to the authenticated YouTube channel using the resumable videos.insert flow and the youtube.upload scope.
body | string | required
Channel ID used to look up the stored server-side OAuth session.
body | file | required
Binary video file sent as multipart/form-data.
body | string | required
Video title, max 100 characters.
body | string | optional
Video description, max 5000 characters.
body | string | optional
One of private, public, or unlisted.
body | string | optional
Comma-delimited tag list.
body | string | optional
Optional YouTube video category ID.
Video upload completed successfully.
{
"ok": true,
"upload": {
"id": "a1b2c3d4",
"kind": "youtube#video"
}
}Stored session is missing the required upload scope.
{
"ok": false,
"error": "The stored YouTube session is missing the youtube.upload scope."
}