Validate webhook

Hello! In our integration, we use the following logic:

  1. Create a Meeting via API (use Server-to-Server OAuth)
  2. Connect to the Meeting using the Meeting SDK
  3. Use webhooks for events: Start Meeting and End Meeting (Server-to-Server OAuth)

Manual validation of the endpoint URL for webhooks succeeds.
Everything works perfectly!

But there is a problem:

  1. Automatic validation does not work and every day we have to manually validate the endpoint URL. Although nothing has changed in the APP. Although we have added automatic validation processing in the code as indicated in the doc - https://marketplace.zoom.us/docs/api-reference/webhook-reference/#validate-your-webhook-endpoint

Tell me how to solve this problem?

  1. Why are webhook logs not displayed (PERSONAL APP MANAGEMENT => Webhook Logs)?

Thank you very much and have a nice day!

1 Like

Hi @elisa.zoom , @MaxM
Could you help us with this issue?

Thanks.

listing:

public function webhookHandler(Request $request)
	{
		$request_body = $request->all();
		Log::debug('webhookHandler:request', [
			$request_body,
			$request->header('x-zm-signature'),
		]);

		if ($this->verified_signature($request)) {

			if ($request_body['event'] == 'endpoint.url_validation') {
				$response = $this->zoom_url_validate($request_body);

				Log::debug('webhookHandler:url_validation', [
					$response,
				]);

				return response()->json($response, 200);
			} else {
				$message = 'Authorized request to ' . config('app.name');

				Log::debug('webhookHandler: ' . $message, [
					$request_body,
					'event' => $request_body['event'],
				]);

				// business logic here, example make API request to Zoom or 3rd party


				return response()->json(['message' => $message], 200);
			}
		} else {
			Log::debug('webhookHandler:verified_signature', [
				$request_body,
			]);

			return response()->json(['message' => 'Unauthorized request to ' . config('app.name')], 401);
		}
1 Like

Hey @vito.co
Sorry for the late reply to this!
Were you able to validate your endpoint URL?