Webhook Subscription - Not Verifiable Callback URL

605 views
Skip to first unread message

Naaman Campbell

unread,
Dec 31, 2017, 8:22:39 PM12/31/17
to Strava API
Hi,

I am unable to setup a new webhook subscription due to the following error:

{
  "message": {
    "errors": [
      {
        "code": "not verifiable",
        "field": "callback url",
        "resource": "PushSubscription"
      }
    ]
  }
}

Other posts to this forum have pointed towards problems with SSL certificates and certificate chains.
The following sites return valid results for my callback URL certificate:
I am unable to configure a http:// callback URL as it sits behind an AWS API Gateway + (restricted) CloudFront setup.
http:// gets redirected to https:// as well.

The alternative is to build another app to handle webhook events..

Cheers,
Naaman

Naaman Campbell

unread,
Jan 2, 2018, 6:57:28 AM1/2/18
to Strava API
To workaround the AWS/HTTPS/Python issue, I have setup a working subscription using Azure Functions with Javascript.
One of my project goals is to run a serverless website and Azure Functions seemed to be one of the only providers allowing HTTP requests.
My Azure Functions code is published as a GitHub Gist:

The AWS API Gateway FAQ states that HTTP is not supported (allowed).

I also received the "not verifiable" "callback url" error when I was not passing back a valid verification response.
It would be helpful if a better error code was returned for invalid verification responses.

My Python verification code is below for review:

if request.args.get('hub.mode') \
   
and request.args.get('hub.verify_token') == 'STRAVA':
    response
= jsonify({
       
'hub.challenge': request.args.get('hub.challenge')})
   
return make_response(response), 200


Cheers,
Naaman
Reply all
Reply to author
Forward
0 new messages