Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

My big idea: Ancient Brain

Search:

CA114      CA170

CA668      CA669      Projects


Web APIs

This page has examples of easy-to-try-out APIs. i.e. Available to public, free.

There are many other APIs out there apart from public, free ones.


  


Flickr API

  

Public feeds

  

API methods




YouTube API

No public feeds. Need API key.



Twitter API




Hiding API keys

As you see, API developers often want you to use "API keys" to identify your usage of their API. Often, these should be kept secret.

Problem: Javascript code contains API key to do JSONP call. API key not secret.

Solution: Set up a simple proxy on your server. This proxy calls the service with the API key (not exposed) and outputs the result. Your Javascript calls the proxy. Only your Javascript can call the proxy (same origin). Should be just a few lines of PHP.

  

ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.

Wikipedia: Sometimes I link to Wikipedia. I have written something In defence of Wikipedia. It is often a useful starting point but you cannot trust it. Linking to it is like linking to a Google search. A starting point, not a destination. I automatically highlight in red all links to Wikipedia and Google search and other possibly-unreliable user-generated content.