1

I'm having trouble using the reminder method to set a reminder using the Slack API.

https://api.slack.com/methods/reminders.add

I want to set a reminder for various people in our workspace. My understanding of the Slack API docs is that a workspace token is needed for permission, which I have created. See https://api.slack.com/docs/token-types#workspace

In POSTing the reminder request, I always get the error { ok: false, error: 'user_not_specified' }. I have specified a user as part of the payload, as well as text, time and the bearer token.

Strange, because the docs say that user is optional. Removing the user from the payload results in the same error.

I'm getting the same error in both Postman and in a simple snippet using the Node Slack API library:

const { WebClient} = require('@slack/client');
const token = process.env.SLACK_TOKEN || require('./.config').SLACK_API_TOKEN;
const web = new WebClient(token);
web.reminders.add({text: 'clean up duty', time: 'in 1 minute', user: 'U0FKQ3N94'})
 .then((res) => {
    console.log(res);
  })
  .catch(console.error);

Any idea what I am doing wrong?

Timothy Barmann
  • 598
  • 7
  • 17

0 Answers0