basvandorst / StravaPHP

Strava API REST client with OAuth authentication
MIT License
184 stars 67 forks source link

How to setup new access token when working on one client object? #97

Open blasbike opened 4 months ago

blasbike commented 4 months ago

I like the library and the separation approach. My use case seems typical but is not easy to implement with the flow needed by this lib. I have several strava events registered by webhook and I process them asynchronously in a batch. Each event might be on behalf of different athlete. So I need to initialize one Client and then setup access token per API call. But the Client depends on REST which has that token. Any ideas how to achieve that? Something like Client::setToken()?

In my other project I use iamstuartwilson/strava which supports full flow (integrated) but lacks other stuff (like streams).