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