• Resolved bigt11

    (@bigt11)


    I wanted to know if, after the Patreon settings wizard is complete, that I will never have to manually hit the “Refresh Token” button on the patreon “My Clients” page. The creator’s access token only lasts 1 month.

    Please confirm that this will be refreshed if expired automatically and then stored in the patreon settings for the plugin. So theoretically I don’t have to worry about expired keys. I am not talking about individual users keys or expiration, just the Patreon Creators keys, the ones seen in the patreon settings -> connection details.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author CodeBard

    (@codebard)

    We had code to refresh the creator token depending on expiration or other conditions, but connectivity in between sites and API seems to be causing problems for some sites.

    In the coming weeks that code will be reconsidered. At the least, there is going to be a new ‘Reconnect’ button which will allow you to easily refresh all your credentials and reconnect the site to API with two clicks. So in that respect you wouldnt need to hassle with creator tokens in future in any case.

    Thread Starter bigt11

    (@bigt11)

    I would like it to be automated and not have to interact with it. I know you are going to remove it, but after you do I will probably automate it on my end for my site.

    Can you confirm that these 2 functions are the main drivers for refreshing the creator access token.

    in patreon_wordpress.php

    check_creator_token_expiration()
    refresh_creator_access_token()

    and gets ran via
    add_action( 'init', array( $this, 'check_creator_token_expiration' ) );

    If I am missing something critical can you please let me know what functions I am missing.

    Plugin Author CodeBard

    (@codebard)

    Indeed, these are the relevant functions and the init hook that trigger the creator token refresh check.

    You can use them or copy them to a plugin of yours.

    However the problem with token refresh as such is that the call to the api depends on the state of your server/host and the connectivity in between them and Patreon. If it does not succeed at the proper time for any reason (server congestion, timeout, connectivity issue, lost packet), then it causes issues.

    Best method to do it programmatically is likely to start attempting it some time before the expiration of the token, and retry if it does not succeed as desired.

    An alternative is non expiring creator tokens on api side.

    Im going to look into this and talk it with the team to come up with a way to handle this in the best way possible. It will likely produce some result in the next 2 months, since there are other pending features and changes that needs releasing first.

    Plugin Author CodeBard

    (@codebard)

    Closed since was answered long time ago.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Creator Access Token Refresh Automatically?’ is closed to new replies.