Thanks for writing in and sharing the details! Your detailed description helped me understand what the issue you have is.
I know it's pretty easy to add a new option to turn calling
auth.test API off at the timing of initialization. But I would like to hold off adding such options because doing so a lot makes udnerstanding the initialization of
App harder for developers.
So, our recommendation for this use case is to use
authorize function with the toekn. Bolt does this under the hood for you. You can learn more about this here: https://slack.dev/bolt-python/concepts#authorization
python def authorize(enterprise_id, team_id, user_id, client: WebClient, logger): # If you want to have a cache for this call, you can do so token = secrets["SLACK_BOT_TOKEN"] return AuthorizeResult.from_auth_test_response( auth_test_response=client.auth_test(token=token), bot_token=token ) app = App( process_before_response=True, signing_secret=secrets["SLACK_SIGNING_SECRET"], authorize=authorize )
Hope this was helpful to you.