Title: Creator Access Token Refresh Automatically?
Last modified: September 7, 2019

---

# Creator Access Token Refresh Automatically?

 *  Resolved [bigt11](https://wordpress.org/support/users/bigt11/)
 * (@bigt11)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/creator-access-token-refresh-automatically/)
 * 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 Contributor [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/creator-access-token-refresh-automatically/#post-11926343)
 * 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](https://wordpress.org/support/users/bigt11/)
 * (@bigt11)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/creator-access-token-refresh-automatically/#post-11946338)
 * 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 Contributor [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/creator-access-token-refresh-automatically/#post-11952588)
 * 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 Contributor [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/creator-access-token-refresh-automatically/#post-12029380)
 * 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.

 * ![](https://ps.w.org/patreon-connect/assets/icon-256x256.png?rev=1782351)
 * [Patreon WordPress](https://wordpress.org/plugins/patreon-connect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/patreon-connect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/patreon-connect/)
 * [Active Topics](https://wordpress.org/support/plugin/patreon-connect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/patreon-connect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/patreon-connect/reviews/)

## Tags

 * [Patreon](https://wordpress.org/support/topic-tag/patreon/)

 * 4 replies
 * 2 participants
 * Last reply from: [CodeBard](https://wordpress.org/support/users/codebard/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/creator-access-token-refresh-automatically/#post-12029380)
 * Status: resolved