-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
Matrix: Logging-in with an access_token #895
Comments
There is a bug on my end. In the URL being posted, you can see that it's adding a colon at the end of the URL (as though a port number might follow but there isn't one). I've fixed it in a local branch this weekend, but I've also see set up a matrix server on my side. I'm going to go through the whole plugin and revitalize it. |
I don't think that's the issue per se. I checked the code and there appears to be no way to give it the access_token directly when logging in via password is disabled on server side (as it's using oauth). |
@caronc Will this be implemented? For me it's currently pretty useless because it logins every time and gets new access token so two messages sent without a long break make only one of the message arrive because server throttles the login:
Logging by access token would solve this because it would do all the requests with the same access token so it wouldn't be throttled |
Hey @uqlel, You can increase rc_login Matrix rc_login documentation I set:
I still throttle sometimes but 2.5ms max instead of 250ms and it works for my use case. I had this throttle error but could not understand it was a login throttle and not a message throttle. |
@uqlel : I'm trying to find a webhook standard for Matrix right now. One thing with webhooks is that it doesn't appear to support attachments. It seems to be a third party addon such as this, but upon googling, there are other formats as well. What (Matrix) service are you specifically using if you don't mind me asking? Also if my interpretation above is really wrong, please correct me too! 🙂 |
Please see https://spec.matrix.org/v1.9/client-server-api/#authentication-types for how one could auth via token directly, and matrix-org/matrix-spec#541 |
Adding support for the Apprise keeps the session as long as it's instance is running. But calling it from the CLI or API, after the service has done it's deed, memory is freed and the session information is lost. I think this is what you're experiencing. The only true solution will be for persistent storage (ticket here). Basically what you're looking for is After Apprise acquires your session, it holds onto it and re-uses it on future instances (saving the extra http request). The trade off of this is Apprise starts managing a small database which can grow, needs management, etc). When I do get around to adding persistent storage, this would be yet another use case for it. Perhaps i should increase the throttle time (to adapt a little better and prevent clever workarounds like @jribal found)? |
Please add instead support for direct |
I'm not sure where we are with this ticket, persistent storage is in place and now the auth token acquired from the server is cached to disk (saving from constant logon and logoff calls). so this will drastically reduce the overhead. Not sure if I introduced any new problems with this new change yet or not. |
I too wish to be able to login via the As an immediate workaround I'm simply using a 3rd party webhook bot. |
SSO is not supported, so we are unfortunately still nowhere. https://github.com/caronc/apprise/blob/master/apprise/plugins/matrix.py#L878 => |
Have a look at the recent PR and if someone could test it out, that woudl be great! Test instructoins are inside link. 🙏 |
❓ Question
I cannot seem to figure out what's the proper syntax for matrix notify urls.
I have the token already but I cannot figure out how do I get it to login using m.login.token and NOT m.login.password (as that is disabled)?
The URL I tried is simply:
matrixs://smb:<token>@matrix.pikaviestin.fi
and I want to send the notify to specific room but it won't let it work in syntaxmatrixs://<token>@matrix.pikaviestin.fi/<internal-room-id-with-!>
The text was updated successfully, but these errors were encountered: