Zoom phone recordings API query returns different IDs than recording complete RESThooks

Description
The /v2/phone/users/{userId}/recordings API endpoint for extension to extension calls is returning the wrong ID for a given call, relative to the recording end event notification resthooks. I have made a table to help make it more comprehensible as to what the issue is.

Rest hooks for a given call:

| from | to | direction | call ID | associated with |
|------+----+-----------+---------+-----------------|
| a    | b  | outbound  | z       | a               |
| a    | b  | inbound   | y       | b               |

recordings API :

| from | to | direction | call ID | associated with |
|------+----+-----------+---------+-----------------|
| a    | b  | inbound   | z       | b               |

When I am trying to find any calls that our application may have missed, this error stops that process from working reliably.

Error
Here are the bodies of the two call end events

%{
            "event" => "phone.recording_completed",
            "event_ts" => 1_613_546_343_468,
            "payload" => %{
              "account_id" => "TlpxuG1XQZyVpmdu3FCCNA",
              "object" => %{
                "call_log_id" => "f6e3ec26-dc2b-4d83-af6b-167e700d2c4d",
                "callee_name" => "QA Tester",
                "callee_number" => "802",
                "callee_number_type" => 1,
                "caller_name" => "Zoom QA",
                "caller_number" => "803",
                "caller_number_type" => 1,
                "date_time" => "2021-02-17T07:18:40Z",
                "direction" => "inbound",
                "download_url" =>
                  "https://zoom.us/v2/phone/recording/download/hcyA4jslTSGSxUrkN4-KJQ",
                "duration" => 10,
                "id" => "6769a95a70f011eb86a7b4969166e3fc",
                "recording_type" => "Automatic",
                "user_id" => "u6K0wu7oTrKw-63B4Ep4BA"
              }
            }
          }
%{
            "event" => "phone.recording_completed",
            "event_ts" => 1_613_546_334_527,
            "payload" => %{
              "account_id" => "TlpxuG1XQZyVpmdu3FCCNA",
              "object" => %{
                "call_log_id" => "47c80745-b139-46fb-878c-fa991db987eb",
                "callee_name" => "QA Tester",
                "callee_number" => "802",
                "callee_number_type" => 1,
                "caller_name" => "Zoom QA",
                "caller_number" => "803",
                "caller_number_type" => 1,
                "date_time" => "2021-02-17T07:18:40Z",
                "direction" => "outbound",
                "download_url" =>
                  "https://zoom.us/v2/phone/recording/download/6mNB5V5YQAKDxPNDuDJQHg",
                "duration" => 9,
                "id" => "6235edd670f011eb86a7b4969166e3fc",
                "recording_type" => "Automatic",
                "user_id" => "TcBXIIgSRCe_-B9VuS8-UQ"
              }
            }
          }

And here is the body of the relevant call in from /phone/users/TcBXIIgSRCe_-B9VuS8-UQ/recordings endpoint

%{
              "account_id" => "TlpxuG1XQZyVpmdu3FCCNA",
              "object" => %{
                "callee_name" => "QA Tester",
                "callee_number" => "802",
                "callee_number_type" => 1,
                "caller_name" => "Zoom QA",
                "caller_number" => "803",
                "caller_number_type" => 1,
                "date_time" => "2021-02-17T07:18:40Z",
                "direction" => "inbound",
                "download_url" =>
                  "https://zoom.us/v2/phone/recording/download/hcyA4jslTSGSxUrkN4-KJQ",
                "duration" => 10,
                "id" => "6769a95a70f011eb86a7b4969166e3fc"
              }
            }

Which App Type (OAuth / Chatbot / JWT / Webhook)?
OAuth

Hey @gareth.seddon,

Thank you for reaching out to Zoom Developer Support. I appreciate all the detail that you provided. The table helps demonstrate the issue. Just to clarify, you seem to be getting two webhooks for the same call but they are in different directions and the webhooks have separate IDs. Is that correct?

Is the information returned from the Phone API accurate or was this an outbound call?

I’ll use that information to investigate this further.

Thanks,
Max

Yes, and I am expecting those two webhooks because it is an internal zoom phone to zoom phone call, so both users would get a ‘recording complete’ webhook. It makes sense to me that they would have different IDs for each user.
The information from the Phone API is accurate except that it has the ID owned by the other user associated.

Hey @gareth.seddon,

Thank you for clarifying that, it definitely helped. I’ve since reached out to our engineering team to see if they are able to provide any insight. (ZOOM-248930)

Thanks,
Max

Thanks Max - Has the team had any luck in their investigations yet?

Hey @gareth.seddon ,

We are still working on this one. We will update you soon! :slight_smile:

Thanks,
Tommy

Hey @gareth.seddon,

Thank you for your patience, I’m happy to report that our engineering team got back to me with some new information. They were able to confirm that when if user A calls user B and they are both from the same account and recording the same call, two webhooks will be sent with opposing “direction” fields. This is something they’ll work to improve in the future.

We also noticed that some of your apps use the same production and development webhook event endpoints. In that case, if you have the development and production versions of the app installed, you will receive two webhook events at the same endpoint.

I hope that’s helpful! Let me know if you have any questions.

Thanks,
Max

1 Like

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