Webhook response is invalid

Description
I have added a webhook on completion of recording, I am data on the given endpoint but that JSON is not valid, I pasted that JSON data in postman then it as says invalid, last two objects are not formatted properly, then for testing I formatted them correctly then it worked

Error

Which App Type (OAuth / Chatbot / JWT / Webhook)? - Webhook
Knowing the endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.

Which Endpoint/s?
Knowing the API endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.

How To Reproduce (If applicable)
Steps to reproduce the behavior:

This is the response I am getting from webhook, last two objects

“requestParameters”: undefined,
“responseData”: undefined

are not formatted properly

{
“applicationId”: “LPIKQ7APRnuMeQSAxy96OA”,
“monitorTime”: 1612229203425,
“traceId”: “Webhook_f684e205779640278297b7e0786149a2”,
“accountId”: “accountId”,
“event”: “recording.completed”,
“status”: “200”,
“userId”: “userId”,
“url”: “/zoomVimeo.php”,
“subscriptionId”: “subscriptionId”,
“requestHeaders”: “N/A”,
“requestBody”: {
“payload”: {
“account_id”: “account_id”,
“object”: {
“uuid”: “H1UYTNGpTTObGQRHupnQuw==”,
“id”: 4112356604,
“account_id”: “account_id”,
“host_id”: “account_id”,
“topic”: “ABC’ Personal Meeting Room”,
“type”: 4,
“start_time”: “2021-02-01T23:57:07Z”,
“timezone”: “”,
“host_email”: “abc@abc.com”,
“duration”: 71,
“total_size”: 364498707,
“recording_count”: 3,
“share_url”: “share_url”,
“recording_files”: [
{
“id”: “645ae3b8-2fb5-4126-ba1b-5079a1803959”,
“meeting_id”: “H1UYTNGpTTObGQRHupnQuw==”,
“recording_start”: “2021-02-02T00:08:51Z”,
“recording_end”: “2021-02-02T01:19:51Z”,
“file_type”: “CHAT”,
“file_extension”: “TXT”,
“file_size”: 897,
“play_url”: “play_url”,
“download_url”: “download_url”,
“status”: “completed”,
“recording_type”: “chat_file”
},
{
“id”: “0d3fc852-105d-44c7-8757-714181dcfc2b”,
“meeting_id”: “H1UYTNGpTTObGQRHupnQuw==”,
“recording_start”: “2021-02-02T00:08:51Z”,
“recording_end”: “2021-02-02T01:19:51Z”,
“file_type”: “M4A”,
“file_extension”: “M4A”,
“file_size”: 67796180,
“play_url”: “play_url”,
“download_url”: “download_url”,
“status”: “completed”,
“recording_type”: “audio_only”
},
{
“id”: “ed6b9dcc-5c98-474b-88a7-6e912b554b00”,
“meeting_id”: “H1UYTNGpTTObGQRHupnQuw==”,
“recording_start”: “2021-02-02T00:08:51Z”,
“recording_end”: “2021-02-02T01:19:51Z”,
“file_type”: “MP4”,
“file_extension”: “MP4”,
“file_size”: 296701630,
“play_url”: “play_url”,
“download_url”: “download_url”,
“status”: “completed”,
“recording_type”: “shared_screen_with_speaker_view”
}
],
“password”: “123”
}
},
“event_ts”: 1612229189588,
“event”: “recording.completed”,
“download_token”: “download_token”
},
“responseHeaders”: {
“Server”: “nginx/1.18.0”,
“Content-Length”: “0”,
“Date”: “Tue, 02 Feb 2021 01:26:43 GMT”,
“Content-Type”: “text/html; charset=UTF-8”
},
“runTime”: “452”,
“ttl”: 1613438805,
“requestParameters”: undefined,
“responseData”: undefined
}

Screenshots (If applicable)

Additional context
In sample response, everything is fine except the last two objects i.e.

“requestParameters”: undefined,
“responseData”: undefined

When I convert them into a “string” then it works

“requestParameters”: “undefined”,
“responseData”: “undefined”

Screenshot - Screenshot by Lightshot & Screenshot by Lightshot

Hey @markus ,

Are you sure the last two objects are the in the request body of the webhook?

They look like meta data from the request and not apart of the webhook.

Thanks,
Tommy

@tommy, yes, actually I copied this from the Webhook APP log. Basically, on my endpoint URL, I added PHP code to subscribe to this response but as this is invalid my PHP code is not subscribing to it so I need to take the log from app itself.

Hey @markus,

Thank you for providing additional information. I should note that what is found in the Webhook-Only Call Logs is not expected to match the response sent by the event subscription itself. It’s not a reliable location to copy from directly for use in your code.

You mentioned that you weren’t able to subscribe to this webhook because you get an invalid response from the event subscription, is that correct? Are you seeing this same response when you get an event subscription or is it different?

I ask because the recording.completed event should provide the following format of JSON when it occurs:

Notably, this doesn’t include the metadata tags that you and @tommy referenced. Are you seeing a different response when you’re subscribed to this event?

Thanks,
Max

Hi Max,

Actually the URL I added as an endpoint is listening to the events and I have added an email to notify whenever there is an even in the zoom, but due to some server issue it is not sending email to me, that’s why I copied the data from webhook log and testing with that, lemme add some other endpoint and then I will add an email function to see what data I am receiving in webhook response, then I will get back to you.

Thanks

Hey @markus,

Thank you for the update. As always, let me know if you encounter any further issues or questions.

Thanks,
Max

Hi @MaxM,

Is there a way where I can send a test webhook to my endpoint that will have data from any of our old recordings, so there will be no need to wait for the actual webhook as we have the next scheduled webinar after 2-3 days from now?

Thanks

Hey @markus,

Thank you for your question. You can copy one of the older events that you’ve received or trigger an event for a test meeting and reuse that data. Once you have a copy, you can POST that to your endpoint.

I hope that helps! Let me know if you have any questions.

Thanks,
Max