Stophy

Authentication

Every request needs a Bearer token. Grab a key from the dashboard, store it in an env var, done.

Every request needs an API key as a Bearer token.

Authorization: Bearer st_YOUR_API_KEY

Example

curl -X POST https://api.stophy.dev/v1/video \
  -H "Authorization: Bearer st_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "videoUrl": "https://www.youtube.com/watch?v=D7liwdjvhWc", "type": "details" }'
const res = await fetch("https://api.stophy.dev/v1/video", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.STOPHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    videoUrl: "https://www.youtube.com/watch?v=D7liwdjvhWc",
    type: "details",
  }),
});
import os, httpx

res = httpx.post(
    "https://api.stophy.dev/v1/video",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
    json={"videoUrl": "https://www.youtube.com/watch?v=D7liwdjvhWc", "type": "details"},
)

Managing keys

Keys are created and revoked from your dashboard. Up to 10 active keys per account.

Keep keys out of source code. Store them in environment variables and never commit them to git.

# .env
STOPHY_API_KEY=st_YOUR_API_KEY

Error response

Invalid or missing key returns 401:

{
  "success": false,
  "code": "UNAUTHORIZED",
  "error": "Invalid or missing API key."
}

On this page