Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

139
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda