Skip to content

How can I refresh the auth #120

Answered by mkb79
rApeNB asked this question in Q&A
Apr 4, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hi.

By default my package make use of the message authentication code (MAC) to authenticate the client to the Audible server. Using MAC for authorization does not need an access token. A valid token is therefore unimportant.

The only point where an valid access token matters is on deregistration part. But auth.deregister_device() will refresh the access token automatically before unregister a device.

But to answer your question. To manually update an access token you can call auth.refresh_access_token(). This will update the token only if they are expired. To force a refresh call auth.refresh_access_token(force=True).

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@rApeNB
Comment options

@mkb79
Comment options

@rApeNB
Comment options

@mkb79
Comment options

Answer selected by rApeNB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants