cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.

Push Subscription Bad Request 400 error

ahaeger
Mt. Kenya

Hi,

I'm working on registering my app for push subscription and when I run the post request outlined here I receive 400 status and this:

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

I'm able to get 200 status and the required hub.challenge to return if I hit the callback_url from 1) python requests & 2) curl. Then when I run the post (push subscriptions request) either with Python requests or curl, I receive the above error. Checking my server, I do not receive anything from Strava in this. Its like the callback url is blocked before Strava sends anything to it and I get the above error within 1 second, when it should be waiting 2 seconds for a response.

My server is running a flask api with nginx proxying api calls to the flask server. Could this be causing issues?

Does anyone else have any ideas for what I can check out? I'm operating at a .ai domain. Anything I should be aware of there?

Python:

response = requests.post(url,verify=True)
Curl (same string)
7 REPLIES 7

bryantlikes
Shkhara

Looks like you're missing the verify_token? Would match up to the error you're getting back. 

 

verify_token
required string
String chosen by the application owner for client security. An identical string will be included in the validation request made by Strava's subscription service.

Thanks for the note. The verify_token is at the end of the string

I'd try something other than STRAVA. I feel like they block that one since it is just the default example. Could be wrong though.  

Tried something else just now... Still getting the same thing. I fear this has something to do with SSL and my nginx reverse proxy

For anyone that comes across this in the future... the issue had to do with SSL. I've made a workaround for now and the push_subscription is working (for dev at least). 

ahaeger
Mt. Kenya

@Elliott can you by chance offer any suggestions to my problem?

ahaeger
Mt. Kenya

Do any @Admin @Kask_admin @tshirtadmin @Elijahadmin have any suggestions?