Created
November 10, 2020 09:46
-
-
Save alanbchristie/913111976ad5e033a88f2ab97430facc to your computer and use it in GitHub Desktop.
Changing Clubhouse Labels
This file contains hidden or 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
# A simple example using the Clubhouse API | |
# to get exiting labels and update them - | |
# in this case, change their colour. | |
# | |
# You'll need: - | |
# | |
# curl | |
# jq | |
# List labels | |
# See https://clubhouse.io/api/rest/v3/#List-Labels | |
CLUBHOUSE_API_TOKEN=00000000-0000-0000-0000-000000000000 | |
curl -X GET \ | |
-H "Content-Type: application/json" \ | |
-H "Clubhouse-Token: $CLUBHOUSE_API_TOKEN" \ | |
-L "https://api.clubhouse.io/api/v3/labels" | jq '.' | |
# Now update a label's colours | |
# See https://clubhouse.io/api/rest/v3/#Update-Label | |
LABEL_ID=1234 | |
LABEL_COLOUR=#049ccc | |
curl -X PUT \ | |
-H "Content-Type: application/json" \ | |
-H "Clubhouse-Token: $CLUBHOUSE_API_TOKEN" \ | |
-d '{ "color": "'"$LABEL_COLOUR"'" }' \ | |
-L "https://api.clubhouse.io/api/v3/labels/$LABEL_ID" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment