Developer API

TehGD offers developers free access to the TehGD API. The API allows any developer to integrate TehGD into their application or website. The API simply prints out in plain text the short URL, you can then display this in your application or website.

Obtaining an API key

Due to the amount of recent spam posted through the API, developers must now obtain an API key. To recieve your developers API key, you must contact us.

Send an email to dev@teh.gd with the following information:

  1. Your name
  2. Your email
  3. Information on how you wish to use the API

Once your request has gone through, we shall email you back with your developer key.

 Please be aware that all requests are manually processed.

Using the API

Once you have obtained your developer key, you can then start to use the API!

http://teh.gd/api.php?a={AUTHORIZATION KEY}&n={YOUR NAME}&e={YOUR EMAIL}&k={YOUR DEV KEY}&u=example.com&g=UA-1234567-1&p=1

Replace example.com with the URL you wish to shorten. As a new feature, TehGD automatically prepends the http:// protocol to any URL that does not include it - making your life much easier!

$_POST value Description
u URL - TehGD will automatically prepend a http:// if one is not found.
g Google Analytics code - please ensure that it's in the correct format: /UA-[0-9]{6,8}-[0-9]{1,2}/
p Private: 0 (public/default) or 1 (private)

If you require any help with using the API, please contact us at dev@teh.gd for more information!

Show off your usage!

If you've used the developer API we would love to see how! Send some details to us, so we can advertise it for you! Please send any emails to dev@teh.gd - we look forward to seeing your uses soon!

TehGD is yet another web application written by James Brooks 2010