So, I created the slack bot and it was working completely fine but, When I distributed the slack bot app to another workspace I started facing the "user not found" error on API call of "users_profile_get" as I have also cross-checked the required scopes for this API, user_id, and access token and they are completely fine but still API call returns user not found. I need your help guys on it as I am missing something while distributing the app or Is there any other problem? There is also One strange thing that I can call "chat.postMessage" API of slack and it runs successfully.
result = app.client.users_profile_get(user=slack_id)
While calling this API, I am getting error :
{
"ok": false,
"error": "user_not_found"
}