Search code examples
slackslack-apislack-commands

How to fix the Error which getting users.profile.get in SLACK


I am trying to get the User account information for which I am trying to Test using Slack Tester.

api.slack.com/methods/users.profile.get/test

when I give my Token and click on Test I am getting the error below:

{
    "OK": false,
    "error": "missing_scope",
    "needed": "users.profile:read",
    "provided": "identify,bot,incoming-webhook"
}

Solution

  • Your token is missing the required scopes.

    As the error message says you need the scope users.profile:read to run the API method users.profile.get.

    To get a token with the needed scope you need to add the scope to your Slack app and reinstall into the workspace.

    Also this API method will not work with bot tokens. You need to provide a user token aka Oauth Access Token.