title: Slack Modal submission response to bot's DM not working on different workspace
body: <p>I'm working in a slack bot(<strong>scope chat:write, commands, and users:read</strong>), after initiating the bot, a modal opens up, and on submission, the response should be sent to that bot's DM. I'm using <strong>chat.postMessage API</strong> to achieve this(something like this <a href="https://api.slack.com/tutorials/message-action" rel="nofollow noreferrer">https://api.slack.com/tutorials/message-action</a>). Below is the sample code, this works in a workspace from where I created the bot but when I tried the same on a different workspace in getting <code>{&quot;ok&quot;=&gt;false, &quot;error&quot;=&gt;&quot;channel_not_found&quot;}</code></p>
  <pre><code>response = JSON.parse(params[:payload])
  user_id = response[&quot;user&quot;][&quot;id&quot;]
  args = {channel: user_id ,text: &quot;A message&quot;} 
  @options = { body: args}
  HTTParty.post(&quot;https://slack.com/api/chat.postMessage&quot;,
    { 
      :body =&gt; args.to_json,
      :headers =&gt; { 'Content-Type' =&gt; 'application/json', 'Authorization' =&gt; 'Bearer Bot User OAuth Access Token'}
    })
  </code></pre>
  <p>What the best way to achieve this? I can't submit it to the app directory because the bot needs to be added in at least two workspaces.</p>