I am writing a slackbot and it involves scheduling change of status at certain times set.
I found the below API to update status but looks like I need a chron job to look up the time
POST /api/users.profile.set
Host: slack.com
Content-type: application/json; charset=utf-8
Authorization: Bearer xoxp_secret_token
{
"profile": {
"status_text": "riding a train",
"status_emoji": ":mountain_railway:",
"status_expiration": 0
}
}
I found a scheduler to schedule messages but the API as such is for scheduling messages.
POST https://slack.com/api/chat.scheduledMessage
Content-type: application/json
Authorization: Bearer xoxb-your-token
{
"channel": "YOUR_CHANNEL_ID",
"text": "Hey, team. Don't forget about breakfast catered by John Hughes Bistro today.",
"post_at": 1551891428,
}
Can someone suggest an event which does not use chron job but schedules this action