{"id":24600,"library":"slackeventsapi","title":"Slack Events API Python Adapter","description":"A Python adapter for the Slack Events API, built on Flask. It handles event verification, parsing, and dispatching for incoming Slack events. The current version is 3.0.3, requiring Python >=3.6 and Flask 2.x. Releases are irregular as the library is in maintenance mode.","status":"active","version":"3.0.3","language":"python","source_language":"en","source_url":"https://github.com/slackapi/python-slack-events-api","tags":["slack","events-api","flask","adapter"],"install":[{"cmd":"pip install slackeventsapi","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for handling HTTP requests and event routing.","package":"flask","optional":false},{"reason":"Used for event emitter pattern; v3.0.3 pins max version due to breaking changes.","package":"pyee","optional":false},{"reason":"Used for verifying signing secrets and outgoing requests.","package":"requests","optional":false}],"imports":[{"note":"","wrong":null,"symbol":"SlackEventAdapter","correct":"from slackeventsapi import SlackEventAdapter"},{"note":"","wrong":null,"symbol":"verify_signature","correct":"from slackeventsapi import verify_signature"}],"quickstart":{"code":"import os\nfrom flask import Flask\nfrom slackeventsapi import SlackEventAdapter\n\napp = Flask(__name__)\nslack_signing_secret = os.environ.get('SLACK_SIGNING_SECRET', '')\nslack_events_adapter = SlackEventAdapter(slack_signing_secret, \"/slack/events\", app)\n\n@slack_events_adapter.on(\"app_mention\")\ndef handle_app_mention(event_data):\n    print(\"App mentioned:\", event_data)\n    return \"OK\"\n\nif __name__ == \"__main__\":\n    app.run(port=3000)\n","lang":"python","description":"Minimal Flask app using SlackEventAdapter to respond to app_mention events."},"warnings":[{"fix":"Upgrade Python to 3.6+ and Flask to 2.x.","message":"In v3.0.0, dropped support for Python 2.7 and Flask 1.x. Ensure your environment uses Python >=3.6 and Flask >=2.0.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Migrate to slack_bolt: https://github.com/slackapi/bolt-python","message":"The library is in maintenance mode; no new features are planned. Slack recommends using Bolt for Python (slack_bolt) for new projects.","severity":"deprecated","affected_versions":"all"},{"fix":"Offload processing to a background thread or queue. See GitHub issue #84.","message":"Event acknowledgements must be sent within 3 seconds. Long-running handler blocks the response; use threads or async to avoid timeout.","severity":"gotcha","affected_versions":"all"},{"fix":"Update your app to use Signing Secret from Slack app settings. Pass signing_secret instead of verification_token.","message":"In v2.0.0, switched from Verification Token to Signing Secret. Old code using Verification Token will fail.","severity":"breaking","affected_versions":"<2.0.0"}],"env_vars":null,"search_vec":"'2':38 '3.0.3':32 '3.6':35 'adapt':5,8,55 'api':3,13,53 'built':14 'current':29 'dispatch':23 'event':2,12,19,27,52 'events-api':51 'flask':16,37,54 'handl':18 'incom':25 'irregular':42 'librari':45 'mainten':48 'mode':49 'pars':21 'python':4,7,34 'releas':40 'requir':33 'slack':1,11,26,50 'verif':20 'version':30 'x':39","created_at":"2026-05-01T08:13:56.095620+00:00","updated_at":"2026-05-01T08:13:56.095620+00:00","problems":[{"fix":"Run: pip uninstall slackeventsapi && pip install slackeventsapi. If still fails, check the package version: import slackeventsapi; print(slackeventsapi.__version__)","cause":"The package is installed but not correctly imported; or version does not export that name.","error":"ImportError: cannot import name 'SlackEventAdapter' from 'slackeventsapi'"},{"fix":"Pass your Slack app's signing secret: SlackEventAdapter('your_signing_secret', '/events', app)","cause":"The first argument to SlackEventAdapter is now signing_secret (required in v2.0+).","error":"TypeError: __init__() missing 1 required positional argument: 'signing_secret'"},{"fix":"Double-check SLACK_SIGNING_SECRET environment variable. Ensure server time is accurate (NTP). If behind a proxy, forward original headers.","cause":"Request signature verification failed. Usually due to misconfigured signing_secret or clock drift.","error":"slackeventsapi.exceptions.SlackRequestVerificationFailed: Invalid request signature"},{"fix":"Ensure your route returns a plain text response with the challenge value. Using SlackEventAdapter automatically handles it.","cause":"The event URL verification endpoint returns unexpected body or status code.","error":"Challenges are not matched and the URL verification fails"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.0.3","cli_name":"","cli_version":null,"type":"library","homepage":"https://slack.dev/python-slack-events-api/","github":"http://github.com/slackapi/python-slack-events-api","docs":null,"changelog":null,"pypi":"https://pypi.org/project/slackeventsapi/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["communication","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}