How does twitter restrict access to its public api?
===

I haven't really used Twitter much before but my question is more about securing web apis than about Twitter. I have an api that I want to provide public access to, but I want to be able to limit access.

Twitter allows developers to access the data using an api key (I think).

Twitter must also access the data from their website to allow you to tweet / search.

How does Twitter stop developers from impersonating twitter and basically using their api key?