#!/bin/sh
set -e
token=xoxp-my-token
tsEndofday=$(date -d 'today 23:59' +%s)
curl -XPOST\
     -H 'Content-Type: application/json'\
     -H "Authorization: Bearer $token"\
     --data-raw '{"profile":{"status_emoji":":office:","status_expiration":'$tsEndofday'}}'\
     -s --output /dev/null\
     https://slack.com/api/users.profile.set
