Foursquare API突发“Consumer disabled”错误,场地查询请求失败求助
Let's dive into fixing this "Consumer disabled" error you're facing—this message means Foursquare has restricted or disabled your API client (the client_id/client_secret pair you're using) from making requests. Here are the most likely causes and actionable steps to resolve it:
Common Causes & Fixes
Check your app's status in the Foursquare Developer Console
Log into your Foursquare developer account and head to your app's dashboard. Look for any alerts about violations of their service terms, excessive rate limit hits, or inactive app status. Sometimes accounts get flagged if your usage suddenly spikes, or if your app's actual use doesn't match what you specified during registration.Validate your API credentials
Double-check that you're using the correctclient_idandclient_secret—it's easy to accidentally paste a wrong value when updating configurations. Also, confirm that your app hasn't been deleted or marked as inactive in the console.Review your request volume and patterns
Foursquare enforces strict rate limits for API calls. Even if you weren't hitting limits before, a sudden increase in requests or repeated identical queries could trigger a temporary block. Make sure your requests are throttled to stay within their limits, and avoid making unnecessary duplicate calls.Contact Foursquare Developer Support
If you can't spot any issues in your dashboard, reach out to Foursquare's support team. Provide them with yourclient_id, a redacted copy of your failing request (like the example you shared), and details about when the error started. They can explain exactly why your client was disabled and help reinstate it if possible.
Quick Check of Your Request Example
Looking at your sample request:
https://api.foursquare.com/v2/venues/search?ll=27.9253%2C-82.37368&client_id=HVVN3Q2GGRUDAQATCA2YE1H3E0KKYR0PGW15HRP0YIZNUW3G&client_secret={******}&mode=foursquare&v=20161223&query=Caw%20Residential%20Services&intent=browse&phone=8138466598&radius=1000
The structure is correct—parameters are properly URL-encoded, and you're using a valid API version (v=20161223). So the problem is definitely related to your client's status, not the request syntax itself.
内容的提问来源于stack exchange,提问作者Vkona

