What is used “exactly” for the API key is very dependent on who issues it and what services it is used for. However, in general, an API key is a name assigned to some form of secret token, which is transmitted along with requests from a web service (or the like) to identify the origin of the request. The key can be included in some digest of the contents of the request in order to further verify the origin and prevent falsification of values.
Typically, if you can positively identify the source of a request, it acts as a form of authentication, which can lead to access control. For example, you can restrict access to certain API actions based on who is making the request. For companies that make money selling such services, this is also a way to keep track of who uses this thing to bill. In addition, by blocking the key, you can partially prevent abuse in case of too high volumes of requests.
In general, if you have an API public and private key, then it assumes that the keys themselves are a traditional public / private key pair, some form of asymmetric cryptography or related digital signing. These are safer methods for positively identifying the source of the request and, in addition, for protecting the content of the request from tracking (in addition to fake).
Rob Sep 21 '09 at 6:22 2009-09-21 06:22
source share