Git Product home page Git Product logo

Comments (9)

mkb79 avatar mkb79 commented on May 23, 2024

The error code say, that the access token from login is not accepted. Can you try login with auth = Authenticator.from_external_login("au").

Afterwards register with auth.register_device().

from audible.

mkb79 avatar mkb79 commented on May 23, 2024

I can verify that there is some problem register a new device in Australia. I‘ve got the same error code. I will test out more.

If you have books on or don’t take care about login to other marketplaces you can use another country code for login and register. After that change the locale code in auth file to au and remove website cookies (they are not valid for Australia marketplace)!

import audible

auth = audible.Authenticator.from_file(...)
auth.website_cookies = None
# or fetch new ones for Australia
auth.set_website_cookies_for_country("au")
auth.locale = "au"
auth.to_file()

from audible.

mkb79 avatar mkb79 commented on May 23, 2024

I have identified the problem. Amazon Australia handles access_token check differently.

The access_token contains the device_serial which where used at login. And the device_serial when register doesn‘t match the device_serial from login.

I will fix this as soon as possible.

from audible.

mkb79 avatar mkb79 commented on May 23, 2024

I‘ve added a PR now. I can register a new device on Australia marketplace with this. Need test for other marketplaces.

I implemented a serial generator which generates a 32 bytes serial. iPhone has typical 40 bytes. But the login and register running fine. Have to take a look at this.

from audible.

openaudible avatar openaudible commented on May 23, 2024

Wow. Nice fix. Will report back!

from audible.

openaudible avatar openaudible commented on May 23, 2024

Great work.

I verified things work in multiple regions.

I used a 40 hex digit (lower case) device ID for the iphone and passed the whole string to the openid login request (prepended with "device:") and that worked. Don't think you need or want to append the "#A2CZJZGLK2JJVM".

I'm not a python developer, so can't provide much other feedback. (OpenAudible developers use java.)

I did see an instance where your message: "Approval alert detected! Amazon sends you a mail" was used when Amazon actually sent a text message with a link to the confirm URL. So might need to change that to "email or text message".

Owe you a beer or coffee.. Or more. Closing as fixed.

from audible.

mkb79 avatar mkb79 commented on May 23, 2024

I wanted to be close to the iOS Audible app. The iOS App uses the serial + "#" + the device type to build the hex encoded device id.

That‘s the same for the Kindle and the Alexa App. Using the serial only may be running fine for now. But there is no quarantee that this would be not changed like the problem above. Amazon Australia changed the access token check some weeks ago.

Thanks for you advice with the approval alert.

Cheers with a beer ...

from audible.

openaudible avatar openaudible commented on May 23, 2024

Ah- didn’t catch what that # number was. That bug would have taken me weeks. Just released a beta of OpenAudible with the fix. Let me know if you want a license or some $. OpenAudible at email dot tg. Thanks.

from audible.

mkb79 avatar mkb79 commented on May 23, 2024

@openaudible
I wrote a mail to you yesterday!

from audible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.