Skip to main content
Question

Push Subscription Bad Request 400 error

  • August 14, 2024
  • 7 replies
  • 116 views

ahaeger
Forum|alt.badge.img+3

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

ahaeger
Forum|alt.badge.img+3
  • Author
  • Hub Rookie
  • 8 replies
  • August 15, 2024

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


ahaeger
Forum|alt.badge.img+3
  • Author
  • Hub Rookie
  • 8 replies
  • August 16, 2024

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


Forum|alt.badge.img+4
  • Hub Rookie
  • 8 replies
  • August 16, 2024

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.

ahaeger
Forum|alt.badge.img+3
  • Author
  • Hub Rookie
  • 8 replies
  • August 16, 2024

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


Forum|alt.badge.img+4
  • Hub Rookie
  • 8 replies
  • August 16, 2024

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.  


ahaeger
Forum|alt.badge.img+3
  • Author
  • Hub Rookie
  • 8 replies
  • August 17, 2024

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


ahaeger
Forum|alt.badge.img+3
  • Author
  • Hub Rookie
  • 8 replies
  • August 18, 2024

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). 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept, you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings