Closed MercurialPony closed 2 months ago
Yes, it can be done. I'll check the endpoint from Postman to test it. If it works, I'll get back to you
So I checked the endpoint in Postman, and it seems to working as intended but wow that endpoint is so bloated. It not only returns the notifications, but also recommended tweets and users.
It's hard for me to say since the response that I'm seeing in the chrome network inspector is confusing to me. Though I think recommended tweets and users is an account setting - you can disable that yourself (I did so in the web UI)
Btw, there seems to be another endpoint that I think returns the number of notifications? I'm not sure about this one
https://x.com/i/api/2/badge_count/badge_count.json
It would be great if we had a method to get the list of new notifications.
Now I'm not 100% sure, but from what I can tell, the way twitter does this is by querying this endpoint every few seconds
https://x.com/i/api/2/notifications/all.json