helpscout / helpscout-api-php

PHP Wrapper for the Help Scout API
MIT License
98 stars 62 forks source link

SDK v2: Automatically refresh expired token #245

Closed bkuhl closed 4 years ago

bkuhl commented 4 years ago

Targets: v2

Feature

It has been painful for SDK users to manage refreshing their expired tokens. This pull request introduces the ability to refresh such tokens automatically. To accomplish this all that's needed is for a callback to be registered via the ApiClientFactory.

Addresses https://github.com/helpscout/helpscout-api-php/issues/76

Cherry-picked from the v3 implementation.