Venue API requires token but the docs says otherwise

15 views
Skip to first unread message

ribeto

unread,
Jan 7, 2011, 7:42:34 PM1/7/11
to foursquare API
Hi guys,

I'm making a call to get the venues close by calling this url:

https://api.foursquare.com/v2/venues/search?ll=44.3,37.2&llAcc=1000&alt=0&altAcc=10000&limit=25

returns:

{"meta":{"code":400,"errorType":"invalid_auth","errorDetail":"Missing
oauth_token parameter."},"response":{}}


However the doc here (http://developer.foursquare.com/docs/venues/
search.html) specifies that no authentication is required. Anyone
else experiencing this?

matt hunter

unread,
Jan 8, 2011, 3:07:17 AM1/8/11
to foursquare API
As per the documentation found here: http://developer.foursquare.com/docs/oauth.html#userless,
you still need to pass your client_id and client_secret.

Try calling this url instead:
https://api.foursquare.com/v2/venues/search?ll=44.3,37.2&llAcc=1000&alt=0&altAcc=10000&limit=25&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET

Inserting my client_id and client_secret returns the following:
{"meta":{"code":200},"response":{"groups":
[{"type":"nearby","name":"Nearby","items":
[{"id":"4d07283854d0236a81d6fcd5","name":"Habana Outpost","contact":
{"phone":"0001231234"},"location":{"address":"1313 Mockingbird
Lane","crossStreet":"at Fulton St","city":"New York","state":"new
York","postalCode":"AE1234","lat":44.3,"lng":37.2,"distance":
0},"categories":[{"id":"4bf58dd8d48988d1d4941735","name":"Speakeasy /
Secret Spot","icon":"http://foursquare.com/img/categories/nightlife/
secretbar.png","parents":
["Nightlife"],"primary":true}],"verified":false,"stats":
{"checkinsCount":0,"usersCount":0},"specials":[],"hereNow":{"count":
0}},{"id":"4d072778e350b60c7b109142","name":"test Location","contact":
{},"location":{"lat":44.3,"lng":37.2,"distance":0},"categories":
[],"verified":false,"stats":{"checkinsCount":0,"usersCount":
0},"specials":[],"hereNow":{"count":0}},
{"id":"4d07275528926ea8221079c2","name":"testLocation","contact":
{},"location":{"lat":44.3,"lng":37.2,"distance":0},"categories":
[],"verified":false,"stats":{"checkinsCount":0,"usersCount":
0},"specials":[],"hereNow":{"count":0}},
{"id":"4d07264b347da1cd3e97398f","name":"abcd","contact":{},"location":
{"lat":44.3,"lng":37.2,"distance":0},"categories":
[],"verified":false,"stats":{"checkinsCount":0,"usersCount":
0},"specials":[],"hereNow":{"count":0}}]}]}}

-matt

On Jan 7, 7:42 pm, ribeto <rib...@gmail.com> wrote:
> Hi guys,
>
> I'm making a call to get the venues close by calling this url:
>
> https://api.foursquare.com/v2/venues/search?ll=44.3,37.2&llAcc=1000&a...

ribeto

unread,
Jan 8, 2011, 10:48:28 AM1/8/11
to foursquare API
Thanks Matt that sovled my problem! I still think that the docs
should specify that if you don't provide a token you must put in the
client key and secret.

On Jan 8, 3:07 am, matt hunter <mdothun...@gmail.com> wrote:
> As per the documentation found here:http://developer.foursquare.com/docs/oauth.html#userless,
> you still need to pass your client_id and client_secret.
>
> Try calling this url instead:https://api.foursquare.com/v2/venues/search?ll=44.3,37.2&llAcc=1000&a...
Reply all
Reply to author
Forward
Message has been deleted
0 new messages