Skip to content

Instantly share code, notes, and snippets.

@ZiTAL
Last active August 25, 2024 14:30
Show Gist options
  • Save ZiTAL/fab0b4b9a84d70aaa8e4d0d2a36dfbe9 to your computer and use it in GitHub Desktop.
Save ZiTAL/fab0b4b9a84d70aaa8e4d0d2a36dfbe9 to your computer and use it in GitHub Desktop.
owncast: api examples
#!/bin/bash
API="https://live.zital.eus/api"
# create token: admin -> integrations -> access tokens: https://live.zital.eus/admin/access-tokens/
TOKEN="1298372189738912789372189asjhkdgbashjgbhjsaghjasgdhjg_DncA5RZnNfU449Y-Rg3cITHuk="
PASSWD="abc1234"
# set stream title
TITLE="izenburua!"
curl -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d "{\"value\":\"${TITLE}\"}" "${API}/integrations/streamtitle"
# Set federated go live message
TITLE="zuzenean!"
curl -u "admin:${PASSWD}" -X POST -H "Content-Type: application/json" -d "{\"value\":\"${TITLE}\"}" "${API}/admin/config/federation/livemessage"
# Send federated go live message
TITLE="etorri zuzenekora!"
curl -u "admin:${PASSWD}" -X POST -H "Content-Type: application/json" -d "{\"value\":\"${TITLE}\"}" "${API}/admin/federation/send"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment