User to open a direct message channel with.
async
(params, auths) => {
}
//See the API docs here: https://api.slack.com/methods/im.open
const data = {
user: params.user,
include_locale: params.include_locale || false,
return_im: params.return_im || false,
}
const config = {
method: "post",
url: `https://slack.com/api/im.open`,
headers: {
Authorization: `Bearer ${auths.slack.oauth_access_token}`,
},
data,
}
return await require("@pipedreamhq/platform").axios(this, config)