I am trying fetch the users details using PostMan i am getting below error.
users.list
Headers passing Token & Content-Type as urlencoded
When i test i am getting:
"error": "not_authed"
not_authed
means that the Slack API did not recognize your token. This is properly due to an encoding mismatch.
In Postman make sure to set your request to https://slack.com/api/users.list
as POST.
In Body set to x-www-form-urlencoded
and set at key for token
.
Do not set any Auth or Headers yourself (Postman will do that for you. The Header Content-Type
will be set to application/x-www-form-urlencoded
though)
You can also more simply fetch the user list with a GET request and just add the token as URL parameter. No encoding setting for the body required.