Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
STRAVA Webhooks help - Javascript. Getting bad request error

I am sending subscription request as follows

<form action="https://www.strava.com/api/v3/push_subscriptions" method="post" id="myform">
     <input type="hidden" name="client_id" value="XXX"/>
     <input type="hidden" name="client_secret" value="XXXX"/>
     <input type="hidden" name="callback_url" value="XXXX"/>
     <input type="hidden" name="verify_token" value="STRAVA"/>
     <input type="submit" value="Connect Webhook"/>
</form>

And then I am trying to validate the callback using PHP:

$hubMode = $_GET['hub_mode']; 
$hubVerifyToken = $_GET['hub_verify_token'];
$hubChal = $_GET['hub_challenge'];
$submitChallenge = array("hub.challenge"=>$hubChal);
header('Content-Type: application/json;');
http_response_code(200);
echo json_encode($submitChallenge);

I keep getting error as {"message":"Bad Request","errors":[{"resource":"PushSubscription","field":"callback url","code":"not verifiable"}]}

Please help on what I am doing wrong.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The callback URL must be publicly available (not localhost). You can use Ngrok to redirect from an outside facing URL to your localhost URL.

Check this article from Strava about webhooks: https://developers.strava.com/docs/webhookexample/

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!