Webhook not not sending requests

Hi all!
I’ve recently migrated from jwt-authentication to s2s-oauth, and I’ve rewritten most of the required code on my url-endpoint accordingly.
I’ve passed the url-endpoint-validation part, and wanted to test my actuall events, but I don’t seem to be getting anything incoming from the webhook.
E.g., I have a “recording has been deleted (removed to trash)” event, and so I went ahead and deleted a recording, but no event was sent to my webhook url flask app.

I’ve simplified things for the sake of just logging such events, but obviously if nothing comes through then that doesn’t really help debug.

What should I check? What might I be doing wrong?

Here’s some info so we can jump straight to the interesting problems and skip the obvious mistakes:

Example event checked -

Url has been validated -
image

And some (simplified) code -

@app.route('/zoom_recordings_webhook/', methods=['POST'])
def run_main_new_zoom_recording_available():
    request_body = request.get_json(force=True)
    request_body_str = json.dumps(request_body, separators=(",", ":"), ensure_ascii=False)

    x_zm_signature = request.headers['x-zm-signature']

    message = f"v0:{request.headers['x-zm-request-timestamp']}:{request_body_str}"
    hashed_message = hmac.new(bytes(ZOOM_SECRET_TOKEN, 'latin-1'),
                              msg=bytes(message, 'latin-1'),
                              digestmod=hashlib.sha256).hexdigest()
    signature = f"v0={hashed_message}"
    if x_zm_signature == signature:
        if request_body['event'] == 'endpoint.url_validation':
            plain_token = request_body['payload']['plainToken']
            hash_for_validation = hmac.new(bytes(ZOOM_SECRET_TOKEN, 'latin-1'),
                                           msg=bytes(plain_token, 'latin-1'),
                                           digestmod=hashlib.sha256).hexdigest()

            response = json.dumps({'plainToken': plain_token, 'encryptedToken': hash_for_validation})
            return Response(response=response, status=200)
        else:
            print(request_body)
            print('===============================')
            print(list(request.headers.keys()))
            print('###############################')

    else:
        print('Nope...')
        print(signature)
        print(x_zm_signature)
        print('***************************************')

I’ve also looked at the app dashboards on the zoom-app-market, and I don’t see any POST requests, but I’m not sure how indicative that is…

Thanks in advance!
Shlomi

Hi @shlomi.fenster
Thanks for reaching out to us!
I see that you are having issues receiving events with your Server to Server Oauth app.

I see that you successfully validated your URL but you are not getting any events.
could you add another event such as meeting.created and try and trigger the endpoint?
Sometimes the events take a couple of minutes to be delivered to the endpoint.

I also wanted to share a link to a blog post we have that will help you troubleshoot webhooks with one of our sample apps and ngrok.

Let me know if this helps
Elisa

Ok, I played around a bit, and it looks like you’re right. The time for the hook to activate can be a few minutes, which I wasn’t expecting, (I thought it would be a matter of a few seconds at most).
Thanks!

1 Like

Thanks for confirming this @shlomi.fenster
Happy tthat works now!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.