1

I am trying to get my python slack bot to work. I want to get the info of the user who is trying to make API calls using users.identity API. However, I was unable to make it to work.

Any tips and idea why?

This is the error I get.

this is the error i get

Thanks in advance.

Micho
  • 3,929
  • 13
  • 37
  • 40
J.Titor.0
  • 79
  • 12

1 Answers1

1

It won't work on https://api.slack.com/methods/users.identity/test. But if you create an "app/script" where you can authenticate and then request with https://slack.com/api/users.identity?token=xxx you will get a valid response for the logged in person. With User Name,User id and Team id

Renstrah
  • 46
  • 1
  • 8
  • i am using slackclient. Can you be more specified about authentication? I tried https://slack.com/api/users.identity?token= on browser wont work, and I also tried slack_client.api_call("users.identity", token="...")) on python still wont work – J.Titor.0 Jul 05 '17 at 02:27
  • this is the message i got '{u'needed': u'identity.basic', u'provided': u'identify,read,post,client,apps', u'ok': False, u'error': u'missing_scope'}' – J.Titor.0 Jul 05 '17 at 02:37
  • You will need to do this step https://api.slack.com/docs/oauth to get an access token. in https://api.slack.com/docs/oauth#appending_scopes you will need to add this scope to the oauth request users.identity. – Renstrah Jul 07 '17 at 07:14