I'm having a problem using the foursquare realtime API and a self signed certificate. Every time I make a test push I get back "Your Server returned: 502 Bad Gateway" but I'm 90% sure it's not actually reaching my server (I have it set to watch get & post at any address and nothing comes through, if I get/post to any address on the server it works. Local and remote.) Is there some kind of issue with self signed certs and the push api?
Asked
Active
Viewed 627 times
0
-
Can you give more details (e.g. your push URL?) – akdotcom May 24 '12 at 15:40
-
The push URL is home.exiva.net:8093/foursquare (It's up now.) My code on my node project, just to do some pretty broad debugging is as follows `var express = require('express'); var app_s = module.exports = express.createServer(ssl_options); app_s.get('*', function(req, res){ res.send('Hello, World.'); console.log("Hello, https."); }); app_s.post('*', function(req, res){ res.send(200); console.log(req); }); app_s.listen(8093, function(){ console.log("Express HTTPS server listening on port %d in %s mode", app_s.address().port, app_s.settings.env); });` – exiva May 24 '12 at 19:24
1 Answers
0
The 502 error makes it sound like it could be a configuration error on your side, unrelated to your actual code, or foursquare. Generally speaking, running self-signed certs should be fine for our Push API's, so I doubt that's your issue.
If you're not already familiar with 502 errors, you can read up on them a bit here: http://www.checkupdown.com/status/E502.html
I know you said it was working for general remote connections, but it's possible there's something your host doesn't like about requests originating from foursquare? We use Amazon Web Services, so the originating IPs come from a large pool of IP addresses that sometimes end up on block lists (if say, someone wrote a misbehaving app also on Amazon Web Services).

smehmood
- 1,906
- 12
- 9
-
Sorry for the long delay in response. I'm fairly positive my code is fine. ~$ curl --data "Hello, World" https://localhost:8093/foursquare --insecure works perfectly from local, and remote. I also have the same code listening for a push from instagram (also from AWS), and that works fine as well. So the only difference is the self signed certificate. – exiva Jun 12 '12 at 05:32
-
2Ah, it looks like a few other users who are using a non-default SSL port are running into the same issue. This is probably a problem with our out-going proxy set-up. Try running the server on the default HTTPS port (443), and it should work. Sorry for the trouble. – smehmood Jun 19 '12 at 21:48
-
Will this eventually be fixed? Some of the installations I'm looking at for using push will not be able to use 443. – exiva Jun 20 '12 at 01:53
-