Zotero Streaming API - Subscription does not work

70 views
Skip to first unread message

scheidelerl scheidelerl

unread,
Feb 19, 2025, 4:42:33 PMFeb 19
to zotero-dev

I have tried to use the streaming API via different websocket clients to access a backup system of the Zotero data.
I have created an API key that has all the rights that are possible.


As suggested here, I sent the following message, as in the example:

```json
{
    "action": "createSubscriptions",
    "subscriptions": [
        {
            "apiKey": "abscdeokasdopasdkas",
            "topics": [
                "/groups/1234567"
            ]
        }
    ]
}

```

or

```json {
    "action": "createSubscriptions",
    "subscriptions": [
        {
            "apiKey": "abscdeokasdopasdkas"
        },
        {
            "topics": [
                "/users/1234567"
            ]
        }
    ]
}
```
Handshake works and I get the following message back:
`{"event":"connected","retry":10000}`

But if I then send a “createSubscriptions” request, I get no response from the server.

I tried several times, with different API keys and different API Key rights settings. I created an additional library to see if it works with this one. Unfortunately not. I have tried various clients.

I would be very grateful to get a solution or find out what I am doing wrong?

Thank you very much

Dan Stillman

unread,
Feb 20, 2025, 5:57:19 AMFeb 20
On 2/19/25 6:30 AM, scheidelerl scheidelerl wrote:

Handshake works and I get the following message back:
`{"event":"connected","retry":10000}`

But if I then send a “createSubscriptions” request, I get no response from the server.


Sorry, the streaming servers were under heavy load. Try now. We'll be making some adjustments to improve reliability.

I have tried to use the streaming API via different websocket clients to access a backup system of the Zotero data.

I'm not sure what you mean by this, though. The streaming server provides notifications when library data changes — that's it. Library data then needs to be retrieved from the web API. There's no "backup system of the Zotero data" related to the streaming server, unless you're referring to some custom tool that uses the streaming server to immediately get notified when there's new data to back up.

scheidelerl scheidelerl

unread,
Feb 20, 2025, 11:29:37 AMFeb 20
to zotero-dev
Thank you very much. I already noticed yesterday evening that the server is available again.

Exactly, it's about using the push notification to trigger a custom script, I know that it only transmits notifications and nothing else.

Is a detailed notification planned, e.g. which items have changed, or at least in which collection?
It would be nice if it possible to specify a flag or parameter which notifications you want to have returned at which /change/ level.

But thanks for the quick response!
Reply all
Reply to author
Forward
0 new messages