Last active
August 25, 2024 14:30
-
-
Save ZiTAL/fab0b4b9a84d70aaa8e4d0d2a36dfbe9 to your computer and use it in GitHub Desktop.
owncast: api examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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