slack bot scope missing while making api request

Viewed 19382

I have made a slack app in which I have a bot. I have selected channels:history, channels:read, channels:write under my permission scope, and also I have passed scopes

"scope":"bot channel:history channel:read channel:write"

while doing my oauth2 verification (using python), and I got a response where the scope is

"scope":"identify,bot,channels:history,channels:read,channels:write"

along with client and bot access tokens.

Now when I do an api call to fetch history of a channel in which my bot is invited to, I get

{ 
  ok: false,
  error: 'missing_scope',
  needed: 'channels:history',
  provided: 'identify,bot:basic' 
}

Can someone please tell me where I am going wrong. How can I PROVIDE the channels:history scope in my api call. This is really driving me nuts. Should I be using the client access token, ie xoxp-xxxx, instead of bot token, ie xoxb-xxxx ?'

Thanks!

2 Answers
Related