api.theomnix.net

Omnix API

A Next.js and TypeScript callback service for `api.theomnix.net` with Zod validation, secure OAuth handling, and Vercel-ready deployment.

Endpoints

GET/api/health

Returns runtime status, environment, and domain metadata.

POST/api/contact

Validates and accepts a contact form submission.

GET/auth/tiktok/start

Starts TikTok OAuth and redirects the user to TikTok.

GET/auth/tiktok/callback

Validates the state, exchanges the code for tokens, stores them temporarily, and redirects to the frontend completion page.

GET/auth/tiktok/session

Returns the temporarily stored TikTok session, granted scopes, and fetched user profile for a given open_id.

DELETE/auth/tiktok/disconnect

Disconnects a TikTok account by removing the temporary in-memory session for the provided open_id.

GET/auth/youtube/start

Starts Google OAuth for YouTube Data API access using the youtube.readonly and youtube.upload scopes by default.

GET/auth/youtube/callback

Validates 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.

GET/auth/youtube/session

Returns the temporarily stored YouTube session, granted scopes, and cached authenticated channel for a given channel_id.

DELETE/auth/youtube/disconnect

Disconnects a YouTube account by removing the temporary in-memory session and cached channel summary for the provided channel_id.

GET/api/youtube/channel

Fetches the authenticated user's current YouTube channel using the stored server-side access token and the youtube.readonly scope.

POST/api/youtube/videos/upload

Uploads a video to the authenticated YouTube channel using the resumable videos.insert flow and the youtube.upload scope.

Example Request

curl -i https://api.theomnix.net/auth/tiktok/start?scope=user.info.basic