-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample for EventSource connection to Fastmail? #7
Comments
Relevant code at https://github.com/jreese/jaymap/blob/main/jaymap/client.py#L107 if that helps. |
Heya. Unfortunately, Fastmail's EventSource doesn't allow non-Fastmail clients to connect, yet. The story behind this is sort of tedious and stupid, boiling down to "updating the EventSource server for this kind of auth was a pain." Fortunately, our pain is coming to an end, and yours might be, too. Very soon we'll be deploying some overhauled code for our push notifications, and it should make fixing this much simpler. I don't have a timeline, but getting this out the door is important to me. Not this week, but should be in the next few months. |
Thank you for the response. So, just to be clear, the only option for receiving pushed changes in third party clients is to use the PushSubscription API with public URLs? |
@jreese Unfortunately Fastmail hasn't implemented the PushSubscription part of the API yet either. This is also something we intend to do but haven't yet got to. |
Hi all, I stumbled upon this issue after receiving the same invalid credentials response using the eventSourceUrl. Any updates or rough timelines available on the 3rd party Fastmail event or push apis? EventSource-like refreshing of data is one of the last major pieces of a project I am working on, so I'd welcome and would be truly appreciative of any general pointers on the matter. |
Any update? I've just spent a few days writing a Fastmail/JMAP notifier for Linux, and I'm saddened to find out both the event source and the websocket methods of getting Push updates aren't available. I guess the project's on hold until non-Fastmail clients can access the event source. |
Hey, as of today, you can create personal API tokens on beta.fastmail.com, which will work to get you an EventSource connection. PushSubscription support is on the road map, but the timeline isn't rock solid yet. |
This hit production a few weeks ago, and so I'm closing this issue. I'm hoping for PushSubscriptions in early 2023. |
Hey, sorry to bring up an old issue but I came across this today. I connected to the fastmail eventsource URL and was curious about the data received. It doesn't seem to follow the JMAP spec, and I was wondering if that is intentional? There are two key differences: Spec requires @type to be, well, "@type" and contain the string "StateChange". The event I received has the key "type" which appears to be a type of state change. Any insight would be appreciated, thanks! Spec: {
"@type": "StateChange",
"changed": {
"a3123": {
"Email": "d35ecb040aab",
"EmailDelivery": "428d565f2440",
"CalendarEvent": "87accfac587a"
},
"a43461d": {
"Mailbox": "0af7a512ce70",
"CalendarEvent": "7a4297cecd76"
}
}
} Actual: {
"changed": {
"a3123": {
"Email": "redacted",
"EmailDelivery": "redacted",
"Mailbox": "redacted",
"Thread": "redacted"
}
},
"type": "connect"
} |
You have found a bug. We'll look into it, thanks. |
Thanks for looking into it! I also noticed the |
Hey folks,
I'm working on a JMAP client for Python that uses AsyncIO, following the specs at https://jmap.io/spec-core.html. I've got the JMAP portion of the API functioning, and I can use that to fetch mailboxes and emails from my personal account. However, when trying to connect to the EventSource URL and stream changes, I always get a 401 Unauthorized error, with "Incorrect username or password."
I'm using the same HTTP client/auth parameters that I use for connections to the JMAP API, and the spec does not mention anything about authentication specific to the EventSource API. Is there a different authentication standard necessary for EventSource connections, or is this something that's not supported for third party applications with Fastmail?
The text was updated successfully, but these errors were encountered: