How can an API client react to events?

Infos:

  • Used Zammad version: 3.4.x
  • Used Zammad installation source: apt
  • Operating system: debian
  • Browser + version: python

For information enrichment on new created tickets, i need to add some information to custom fields wich have to be automatically looked up externally.
Writing information to zammad via API works. I just need an EventStream/Websocket client for python to be able to instantly react to new tickets.

I currently fail to authenticate against the websocket by using a zammad_session* cookie, obtained in a previous requests.Session(), successfully logged in via token.

{"event":"login","session_id":"$cookievalue"}

I really want to avoid polling the server, because the rate has to be quiet high to achive the enhancement before an agent manages to grab the ticket.

Short update: I managed to get the websocket working in an async python client.

There is still an issue. A session can only be used for the websocket if it was previously authenticated via /api/v1/signin, wich seems to be only possible via username/password. Is there any way to get a session authenticated by http_token instead?

I’m sorry, I don’t see a possibility to achieve the requested functionality with an API token.
One of the main reasons for that is the goal of the tokens, technically some things do work differently if you compare it with basic authentication.

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