Short Links API

27 views
Skip to first unread message

Belthesar

unread,
Nov 27, 2008, 1:53:19 AM11/27/08
to Google Apps Labs Short Links
I would love for there to be an API included for short links so that I
could interface it with my website to create short links automatically
to blog posts, posted files, etc. This way I can quickly share links
on social networking services such as Twitter while maintaining site
branding, which is the true power of using Short Links as a GApps
Product.

fastest963

unread,
Nov 27, 2008, 11:00:01 AM11/27/08
to Google Apps Labs Short Links
Yes I agree this would be an awesome feature! Please Google :)

scheff...@google.com

unread,
Dec 1, 2008, 12:22:49 PM12/1/08
to Google Apps Labs Short Links
Hi,

Ok, let's start gathering requirements :-)
Could you post one or two use cases on how you intend to use the API
on your site?
Who would consume the API -- a web server that you program, or
Javascript in a client's browser?
A couple of examples on how you would like to use it in an "ideal
world" would be great.

Best regards,

Jens

fastest963

unread,
Dec 1, 2008, 3:04:44 PM12/1/08
to Google Apps Labs Short Links
It would be an API where a user could HTTP POST data to it, like url
name and long url. Then the return would be either xml or json
(preferred) and it could contain your new link. It would allow for
sites like tinyurl.com where users could make their own links.

I would use it for twittertrend.net (which is currently down for
maintenance), but it would allow users to use a "short" url to link to
their sites results. The "short" url would be auto generated via PHP
and CURL to POST the correct data to your API.

Something like:
http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/shorten
however, you could provide the URL that you want to point to.

Should I explain more? :)
Thanks!
- James

scheff...@google.com

unread,
Dec 3, 2008, 6:22:08 PM12/3/08
to Google Apps Labs Short Links
> Should I explain more? :)
yeah, a little bit :-)

Sounds to me like you are looking for an api call that actually
creates the short link's name (or a short hash or however we would
call it) for you -- is that right?
Also, would the API being called from a client's web browser, or your
server process? It makes a difference on the authentication side: a
server could use a username/password scheme, while a client-side API
will probably need a token based authentication. After all, if we
assume that all those users would not necessarily have user accounts
on your domain, you'd still want to be in control of who can create
these links

Best regards,

Jens

fastest963

unread,
Dec 3, 2008, 8:41:29 PM12/3/08
to Google Apps Labs Short Links
> call it) for you -- is that right?
Yes.

> Also, would the API being called from a client's web browser, or your
> server process?
Server Process

> assume that all those users would not necessarily have user accounts
> on your domain, you'd still want to be in control of who can create
> these links
I would like the created links to just be made under my account (or a
specified account based on token supplied) and they should be public.

Hope that helps!
-James

scheff...@google.com

unread,
Dec 4, 2008, 8:51:27 PM12/4/08
to Google Apps Labs Short Links
>> Sounds to me like you are looking for an api call that actually
>> creates the short link's name (or a short hash or however we would
>> call it) for you -- is that right?
>
> Yes.

Makes sense. I'll probably focus on the automatic hashing of links
first (UI based through a browser)
and think a bit more about an API later on. I'll post a new thread in
this forum when I have something
new :-)

Best regards,

Jens

fastest963

unread,
Dec 4, 2008, 9:23:40 PM12/4/08
to Google Apps Labs Short Links
It shouldn't be too hard, just make an array full of all letters and
numbers and then randomly generate numbers and choose specific index
from array.
Also, since the API would be mainly for private use, you wouldn't need
much auth, just a simple API key and a url parameter. :)

Depending on what you wrote it in, I can help? I have done such work
before with PHP + MySQL.

- James Hartig

fastest963

unread,
Dec 8, 2008, 8:32:59 PM12/8/08
to Google Apps Labs Short Links
When do you think we can expect this?

- James Hartig

scheff...@google.com

unread,
Dec 9, 2008, 1:57:37 PM12/9/08
to Google Apps Labs Short Links
the "hashed links" feature just went live. The API for it might take a
while (I want to make sure that it is sufficiently secure).

Best regards,

Jens
Reply all
Reply to author
Forward
0 new messages