You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call the workos_client.webhooks.verify_event as described in documentation
Our implementation:
...
from workos import client as workos_client
@hooks_bp.route('/workos_hook', methods=['POST'])
def workos_hook():
data = request.get_json()
sig_header = request.headers['WorkOS-Signature']
try:
workos_client.webhooks.verify_event(
payload=data,
sig_header=sig_header,
secret=getenv('WORKOS_WEBHOOKS_SECRET')
)
except ValueError as e:
raise e
data = request.get_json()
if data is None:
raise ParabolaBadRequest('No data received')
workos_webhook_helper.handle_webhook(data)
return post_success_message()
Error
ERROR:parabola.routes.errors:A Wild Exception Appears!
api-server_1 | Traceback (most recent call last):
api-server_1 | File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1838, in full_dispatch_request
api-server_1 | rv = self.dispatch_request()
api-server_1 | File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1824, in dispatch_request
api-server_1 | return self.view_functions[rule.endpoint](**req.view_args)
api-server_1 | File "/app/parabola/helpers/analytics_helper.py", line 28, in decorator
api-server_1 | return f(*args, **kwargs)
api-server_1 | File "/app/parabola/routes/hooks.py", line 112, in workos_hook
api-server_1 | workos_client.webhooks.verify_event(
api-server_1 | AttributeError: 'Client' object has no attribute 'webhooks'
The text was updated successfully, but these errors were encountered:
Hey Jlawlzz - This bug was addressed in the latest release 1.5.1. Could you try updating to this latest version and see if you’re still running in to the error?
Reproduce
Call the
workos_client.webhooks.verify_event
as described in documentationOur implementation:
Error
The text was updated successfully, but these errors were encountered: