cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting a subscription and deauthorization do not work

abhayweb
Mt. Kenya

Hi,

I am able to successfully integrate with strava including authorization, fetching activities, and webhook subscriptions.
However, I have a use case when the user wants to exit my app, I need to delete their subscription and deauthroize them. 
Here's the curl I'm using:

Subscription:
curl -vvv -X DELETE "https://www.strava.com/api/v3/push_subscriptions/259192?client_secret=xxxxxxxxx&client_id=**bleep**"

I'm getting the following error:
{"message":"Resource Not Found","errors":[{"resource":"PushSubscription","field":"","code":"not found"}]}

However the subscription still exists.
Similar issue with deauthorization. Error message for deauthorization: "Record Not Found"

Kindly help.

1 ACCEPTED SOLUTION

ActivityFix
Mount Logan

Individual users/athletes don't have a webhook subscription. It's a single subscription for your client, and through it you receive all events for everyone who has authorized your app.

When an athlete revokes permissions for your app you will receive a single webhook call with apect type delete to let you know they revoked authorization. After that you will no longer receive webhook calls for them, but will continue to do so for your other users.

View solution in original post

2 REPLIES 2

abhayweb
Mt. Kenya

Thank you so much for the response. I happened to read somewhere that webhook subscriptions need to be removed separately. But your response makes total sense. Thanks a bunch.

ActivityFix
Mount Logan

Individual users/athletes don't have a webhook subscription. It's a single subscription for your client, and through it you receive all events for everyone who has authorized your app.

When an athlete revokes permissions for your app you will receive a single webhook call with apect type delete to let you know they revoked authorization. After that you will no longer receive webhook calls for them, but will continue to do so for your other users.

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!


Know how to use Community


Understand Community Settings