#!/bin/sh
set -e
token=xoxp-my-token
tsEndofday=$(date -d 'tomorrow 00:00' +%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
