Tuhin Subhra Dey
Tuhin Subhra Dey

Reputation: 980

Foursquare API for venue gives 301 error

I am using Foursquare API to get venue details while making a request through CURL it gives me

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.8.52</center>
</body>
</html>

error. It was working fine previously and also fetched result but now it seems not working now. Could you please give me any suggestions ?

My api URL is

https://api.foursquare.com/v2/multi?requests=/venues/172832,/venues/172832/tips&oauth_token=MyToken

Thanks in advanced.

Upvotes: 1

Views: 917

Answers (2)

Gary Funk
Gary Funk

Reputation: 11

301 is not an error code. It is a http status code. You need to read the http header response and get the location that you are being redirected to.

Upvotes: 1

akdotcom
akdotcom

Reputation: 4687

Making your request with my own auth token returns valid results -- are you sure you don't have a typo or corrupted element to your url when actually making the request?

Also, be sure to specify a version parameter in your requests to avoid future breakage (https://developer.foursquare.com/overview/versioning)

Upvotes: 0

Related Questions