Closed interpegasus closed 2 years ago
One web-hook subscription is enough for all users. During web hook instantiation it uses the app credentials instead of the user client object generated from user permission.
webhook_client = Strava::Webhooks::Client.new(
client_id: Model::CLIENT_ID,
client_secret: Model::CLIENT_SECRET,
logger: logger,
)
The response from Strava via a POST on the callback_url
will include the owner_id
which can be used to associate the corresponding user.
Please do update the README if you think this could be helpful to the next person!
I'm a random user and I had not even thought about or considered this approach until this issue was created. Thank you both for the discussion and a new approach to try :)
Hello, I would like to know how to receive updates on new activities from all the users that authorized my app on Strava.
Do I need one web hook subscription for each user or just one global subscription for all users. Does
create_push_subscription
take any additional parameters? Thank you in advance.Input
Output
# subscription.id
integer ID