Question

Google states the following in the AJAX Feed API docs:"Applications MUST always include a valid and accurate http referer header in their requests."

I am building a native iPhone application and would like to use the Google AJAX Feed API's REST interface from my app's native objective-c code. Is the API only for use on websites, or can I use it from a native app? In the case that I can use it from the native app, what would my http referer header be?

Was it helpful?

Solution

If you look at the sign up page it refers repeatedly to "your web site" and says the key is only valid for the site you sign up with, so it's fairly clear cut from Google's point of view they only intend it to be used for websites.

I'm surprised there's no explicit discussion of this in the T&Cs though. My interpretation is you can use it within the letter of the terms, but not within the spirit.

OTHER TIPS

While I don't know the specific http referer values that Google would accept, I can assure you that you can impersonate any and all browsers. I often use Safari (which is happy to impersonate a wide variety of other browsers) and browse to my own test site to see what the browser sends to the server. This example of why http_referer testing doesn't work is illustrative.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top