Skip to main content

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.

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?

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.


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


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.


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


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.


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=""'

 


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?


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


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.


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.


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


Reply