Agent Event API Endpoint Invalid | The place for Zendesk users to come together and share
Skip to main content
Question

Agent Event API Endpoint Invalid

  • January 10, 2024
  • 1 reply
  • 1 view

import requests
import json

ZENDESK_EMAIL = input("Email: ")
ZENDESK_API = input("API: ")

url = "https://xxxxxx.zendesk.com/api/v2/incremental/agent_events"
auth = ZENDESK_EMAIL + "/token", ZENDESK_API)
headers = {"Content-Type": "application/json",}
response = requests.get(url, headers=headers, auth=auth)

print("Full API response: ")
print(response.text)

Hi all, 

I seem to keep running into issues with accessing the Agent Events API endpoint. Above is my most recent paired-down attempt and I continue to get the following response: 

Full API response:{"error":"InvalidEndpoint","description":"Not found"} 
Error: 404 - {"error":"InvalidEndpoint","description":"Not found"}

I am a Zendesk admin and have been able to access many other API endpoints without running into this issue. Can anyone see anything obvious that I am doing wrong? 

1 reply

Tipene
  • Employee
  • January 10, 2024
Hey Katie,
 
It looks like you need to update the base URL you're using to make the request. You can read more about that here.
 
Feel free to reach out if you have any questions!
 
Tipene