Webhooks.. Authorization Error

165 views
Skip to first unread message

Leon Broekx

unread,
Jan 22, 2022, 4:13:30 PM1/22/22
to Strava API
I'm trying to Create a subscription with Postman by doing a POST to https://www.strava.com/api/v3/push_subscriptions

Headers:
client_id
client_secret
callback_url
verify_token
Authorization (Bearer + access_token)

It returns:

{
  "message": "Authorization Error",
  "errors": [
    {
      "resource": "Application",
      "field": "",
      "code": "invalid"
    }
  ]
}

My scope is: activity:read
Can't get any other response than this Authorization Error.

What I'm I doing wrong?

C G

unread,
Jan 23, 2022, 4:27:08 AM1/23/22
to Strava API
Is the GET request that Strava is making to your callback_url being handled correctly?
This thread looks similar (although a different error response) and might be helpful: https://groups.google.com/g/strava-api/c/IpLBdvJly6U

Leon Broekx

unread,
Jan 23, 2022, 6:38:54 AM1/23/22
to Strava API
There is no request from Strava at the callback_url, so I think it has something to do with the SSL.

Op zondag 23 januari 2022 om 10:27:08 UTC+1 schreef ad...@bungat.com:

Ben Coomes

unread,
Jan 25, 2022, 8:23:59 PM1/25/22
to Strava API
I don't think user access tokens play a role in creating a subscription. You only need to prove that you are the owner of your app, which you do by providing your client secret. Once your subscription is created, your app will get events for athletes who have authorized your app. So, I would remove the Authorization header for starters. 

But, I think the main problem is that your are passing client_id and client_secret, and callback_url as headers rather than as form parameters. If you're using postman, try the 'form-data' option for your body. Or, use the cURL command in the docs: https://developers.strava.com/docs/webhooks/
Reply all
Reply to author
Forward
0 new messages