Search code examples
javaapipostmanslack

unable to retrieve slack messages using outgoing webhooks


I am new to Slack Webhooks and am trying to retrieve Slack channel messages using Outgoing Webhooks API.

Below is my get GET API.

https://slack.com/api/conversations.history?token=60ClVADXdNAlOfGr239oI8hl&channel=auto_test&limit=10&inclusive=true

API response code:

200 Ok

Below is my response Body:

{ "ok": false, "error": "invalid_auth" }

Can any one please suggest how to use Outgoing Webhook API. Thanks in advance.


Solution

  • Your token should be "Bot User OAuth Access Token", which is present in OAuth & Permissions Tab and starting with xoxb. Provide channelId in channel=channelId