singer-io / tap-linkedin-ads

GNU Affero General Public License v3.0
10 stars 22 forks source link

Add access token introspection to avoid new access token fetch if feasible #50

Closed dsprayberry closed 1 year ago

dsprayberry commented 1 year ago

Description of change

LinkedIn seemingly does not appreciate when we fetch new access tokens while a valid one already exists. This has been observed to exhibit itself in the form of 429 errors suggesting that a user has reached a rate limit while trying to use a refresh token to fetch a new access token in discovery.

This change checks the expiration of an existing access_token (if one is present in the config) and proceeds with that token if so.

Manual QA steps

Risks

Rollback steps

dmosorast commented 1 year ago

Merged in lieu of tests passing because tests passed on local, and automation is in a state right now that's not able to be quickly fixed.