Skip to content
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

Help with connecting to the tolino cloud #5

Open
rheaSPK opened this issue Aug 16, 2022 · 6 comments
Open

Help with connecting to the tolino cloud #5

rheaSPK opened this issue Aug 16, 2022 · 6 comments

Comments

@rheaSPK
Copy link

rheaSPK commented Aug 16, 2022

Hey there, that's probably a beginner error, but I tried a bit and don't know what to do anymore.

So I pulled the repo, changed the tolinoclientrc with my credentials and the partner_id 3 for thalia, then renamed it (btw is it with quotes or without? I tried both). The debug output of my command python tolinoclient.py --config .tolinoclientrc --debug upload ./some.pdf was a page that wanted a proof to see if I'm human.
So I tried the troubleshooting, copied the hardware_id from the request header into the tolinoclientrc as my username and the refresh_token as my password. Unfortunately the debug of python tolinoclient.py --config .tolinoclientrc --use-device --debug upload ./some.pdf gave me a site which basically said "access denied".
Anything I could try differently that this worked? I'm working on mac monterey with python 3.10.

@darkphoenix
Copy link
Owner

So, I had to do a bunch of digging and testing (congrats), because for one I'd never used use_device as a command line flag, and I hadn't used Thalia in months because the tokens expire after 24 hours, but at least in theory what you're doing ought to work. I managed to at least get an inventory request through with these exact conditions. The actual debug output would probably be helpful, but odds are you don't want to put that in an issue as is as I'm pretty sure it has enough cookies to take over an account. At the very least I'd suggest you strip out every line starting with DEBUG:root:cookies and DEBUG:root:headers, and I'd suggest you email it to me at j@die-blahuts.de instead of posting publicly.

@rheaSPK
Copy link
Author

rheaSPK commented Aug 17, 2022

Thank you! Well that’s unfortunate that the tokens expire after 24h. Since I don’t buy ebooks on thalia and there isn’t anything special on the cloud - which provider usually doesn’t make any problems and works without the workaround with use device? Maybe this solves my problem, without a lot of debugging.

@rheaSPK rheaSPK closed this as completed Aug 17, 2022
@rheaSPK rheaSPK reopened this Aug 17, 2022
@darkphoenix
Copy link
Owner

Thank you! Well that’s unfortunate that the tokens expire after 24h. Since I don’t buy ebooks on thalia and there isn’t anything special on the cloud - which provider usually doesn’t make any problems and works without the workaround with use device? Maybe this solves my problem, without a lot of debugging.

I'd consider it a minor annoyance. Your reader (if you have one) will be hard locked to the store you bought it from, but thanks to the "library link" feature, you can link multiple different accounts. I own a Thalia reader, but ever since they started to get a bit annoying with the sign in process, I've used Weltbild for my sync. It also requires use_device, but the token hasn't expired in months for me. You just need to link the two accounts, and they'll effectively share a single library.

@ZippierOstrich1
Copy link

I didn't get it to work either so I thought I'll just add onto this issue. Probably some error on my side but I got difficulties to see it. If you can help me out that would be great.

I try to connect to orellfuessli.ch but with both ways (normal and use-device) I don't get it to work. With the normal way the following comes back:
tolinocloud.TolinoException: login to Books.ch / orellfuessli.ch failed.

With the use-device flag the following gets returned:
tolinocloud.TolinoException: oauth access token request failed.

Can you confirm that orellfuessli.ch (id 8) still ought to work? If yes I at least know the error is definitely on my side.
In any way thanks for your work.

@darkphoenix
Copy link
Owner

Can you confirm that orellfuessli.ch (id 8) still ought to work? If yes I at least know the error is definitely on my side.

I very vaguely recall reworking the code for that provider a year ago, and I probably still have a test account, but no promises. I'll get back to you after the weekend, I'll have to test for myself.

@oscaropenness
Copy link

Has this been resolved? I also struggle to login to books.ch / orellfuessli.ch with the same error. Also tried to extract the token via browser with no luck so far.
Any hints or suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants