Skip to main content
Question

New webhook subscription error


Forum|alt.badge.img+4

Hello,

I am trying to subscribe to webhook events, but I have the following issues.
I get an error: "GET to callback URL does not return 200", so I did a test, as mentioned in Troubleshooting Tips, by sending a GET request to my callback URL. The test worked fine and the response is under 2 seconds. 
I would appreciate some feedback on this matter. I have also attached 2 images showing the process. In the first image, there is a POST request to the subscription endpoint with a status of 400, while the second is a test to my callback URL with a status of 200.
Am I missing something here? Thank you for your help.

12 replies

Forum|alt.badge.img+6
  • Hub Rookie
  • 9 replies
  • June 19, 2024

It's a bit difficult when we can't see more of the URLs in your screenshots, but I have a couple of (stupid) questions:

  1. Have you configured content type application/json in your response?
  2. Does it work if you omit the trailing / in the callback_url?

Forum|alt.badge.img+4
  • Author
  • Hub Rookie
  • 7 replies
  • June 19, 2024

Hello, thank you for your reply. Calback URL is less than 100 characters long and have multiple paths and one query param.
1. Yes
2. I tried with and without
Same error.
Thank you.


Forum|alt.badge.img+1
  • Hub Starter
  • 4 replies
  • July 10, 2024

Make sure the verify_token in your request is correct. It seems to be expecting Strava as a value


Forum|alt.badge.img+4
  • Author
  • Hub Rookie
  • 7 replies
  • July 11, 2024

Thank you @Thomas_P  I did change verify_token value, and stilI get the same error. Also, the error: GET to callback URL does not return 200. It seems like it is sending the request but not receiving 200, and yet I am not receiving anything from Strava.


Forum|alt.badge.img+1
  • Hub Starter
  • 4 replies
  • July 11, 2024

We cannot help much without the webhook code 😬
Make sure you handle POST requests in it and answer a 200 http code. Because the second screenshot only guarantees GET requests answer 200


Forum|alt.badge.img+4
  • Author
  • Hub Rookie
  • 7 replies
  • July 11, 2024

What do you mean by webhook code? In the second screenshot, it shows a GET request because the documentation states that it will issue a GET request to the callback url. I also tested it with a POST request, and it still works, but once I use same webhook in the first screenshot, nothing is received, just that error.


Forum|alt.badge.img+1
  • Hub Starter
  • 4 replies
  • July 11, 2024

What if you try that way ?

curl --location 'https://www.strava.com/api/v3/push_subscriptions' --form 'client_id=""' --form 'client_secret=""' --form 'callback_url=""' --form 'verify_token=""'

 


Forum|alt.badge.img+4
  • Author
  • Hub Rookie
  • 7 replies
  • July 11, 2024

Thank you @Thomas_P  for your help.
I am sorry, but I can't seem to find what is different. It looks identical to what I put in the first screenshot?


Forum|alt.badge.img+1
  • Hub Starter
  • 4 replies
  • July 11, 2024

It looks identical indeed, but I want to be sure Postman isn't doing some dark magic behind the scenes so curl is more transparent.
Eventually be sure your callback url is publicly accessible from outside your local network. It might be the reason why Strava can't reach it


Forum|alt.badge.img+4
  • Author
  • Hub Rookie
  • 7 replies
  • July 11, 2024

I tried with Postman and other alternatives, and the callback URL is public, yet I always get the same error. Thank you, @Thomas_P , for your help. I really appreciate it. Unfortunately, nothing works.


ActivityFix
Superuser
Forum|alt.badge.img+24
  • Superuser
  • 232 replies
  • July 11, 2024

Can you share the headers tab of the GET response? It would be useful to confirm that the content type and status are being sent correctly.


Forum|alt.badge.img+4
  • Author
  • Hub Rookie
  • 7 replies
  • July 12, 2024

Hello @ActivityFix  thank you for your help. Image of Headers tab:


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept, you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings