# ZVA Engagement Reporting API

**URL:** <https://devforum.zoom.us/t/zva-engagement-reporting-api/106019>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [March 19, 2024, 3:42am UTC](https://devforum.zoom.us/t/zva-engagement-reporting-api/106019 "2024-03-19T03:42:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![exiotig](https://avatars.discourse-cdn.com/v4/letter/e/e0b2c6/32.png) [@exiotig](https://devforum.zoom.us/u/exiotig)\
**Post date:** [March 19, 2024, 3:42am UTC](https://devforum.zoom.us/t/zva-engagement-reporting-api/106019/1 "2024-03-19T03:42:07Z")

</div>

**API Endpoint(s)** virtual\_agent/report/engagements [ZVA](https://developers.zoom.us/docs/api/rest/reference/virtual-agent/methods/#operation/GetZVAEngagements)

**Goal**  
Build a script that call `virtual_agent/report/engagements` API to generate reports. This script needs to run by itself without user input.

According to link above, `zva_report:read` Scope is required but it is only selectable under User managed OAuth app, and OAuth requires user authorization [OAuth.](https://developers.zoom.us/docs/integrations/oauth/)

1. Is there another solution that can achieve my goal instead of using OAuth app?
2. Alternatively, I tried using below code and it has error `{'code': 100, 'message': 'Invalid Access token'} ` Is this not a valid approach as I should follow step 1 to get user authorization first?

```auto
import requests

# made up credentials
client_id = 'uzsfdsajRl_v9r_dfs133A'
client_secret = 'nKduriRfaWSSfapIeblYSafdaImXRe'

# Obtain access token
token_url = 'https://zoom.us/oauth/token'
token_data = {
    'grant_type': 'client_credentials',
    'client_id': client_id,
    'client_secret': client_secret,
    'scope': 'zva_report:read' 
}
response = requests.post(token_url, data=token_data)
access_token = response.json()['access_token']

# Make API call to the Zoom Virtual Agent API
api_url = 'https://api.zoom.us/v2/virtual_agent/report/engagements'
headers = {
    'Authorization': f'Bearer {access_token}'
}
response = requests.get(api_url, headers=headers)
print(response.json())

Thanks for your help!
```

---

<div class="post-metadata">

**Author:** ![robin.liu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/robin.liu/32/58067_2.png) [@robin.liu](https://devforum.zoom.us/u/robin.liu)\
**Post date:** [March 28, 2024, 5:41pm UTC](https://devforum.zoom.us/t/zva-engagement-reporting-api/106019/2 "2024-03-28T17:41:18Z")

</div>

HI, @exiotig , you may try this : [Internal apps (Server-to-server)](https://developers.zoom.us/docs/internal-apps/)? to issue the token

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [April 1, 2025, 9:17am UTC](https://devforum.zoom.us/t/zva-engagement-reporting-api/106019/3 "2025-04-01T09:17:43Z")

</div>

Closed on April 1, 2025, 9:17am UTC

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