Skip to content

Instantly share code, notes, and snippets.

@timb-machine
Created October 6, 2021 22:30
Show Gist options
  • Save timb-machine/efc47569be069583742cccfdef4dffd2 to your computer and use it in GitHub Desktop.
Save timb-machine/efc47569be069583742cccfdef4dffd2 to your computer and use it in GitHub Desktop.
Webex Teams as a callback
# setup webex bot auth token env var - get auth here: https://developer.webex.com/my-apps/new/bot
export WEBEX_TOKEN="GET_TOKEN_ABOVE"
# get room id
WEBEX_ROOMID=$(curl --request GET --header "Authorization: Bearer $WEBEX_TOKEN" https://webexapis.com/v1/rooms |jq -r '.items[] | select(.title == "Room Name") | .id')
# post message
WEBEX_MSG="notification here"
curl --request POST --header "Authorization: Bearer $WEBEX_TOKEN" --form "roomId=$WEBEX_ROOMID" --form "text=$WEBEX_MSG" https://webexapis.com/v1/messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment