Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public API for 9m? #5

Open
ghost opened this issue May 27, 2014 · 3 comments
Open

Public API for 9m? #5

ghost opened this issue May 27, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented May 27, 2014

Is there an API available to shorten URL's?

@ehamberg
Copy link
Owner

Hi,
No there isn't – but there probably should be!
If you want to generate URLs, you could POST to /create and read the Location header for now:

$ curl -i --data-urlencode "url=https://en.wikipedia.org/wiki/🍔" http://9m.no/create
HTTP/1.1 302 Found
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 28 May 2014 06:21:01 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Location: /show/滥㚈

(Note that the /create endpoint is rate-limited with a limit of 10 requests per minute with a burst of 3 requests.)

I'll keep this issue open, though, as it would be nice to have a proper, versioned API.

@ehamberg
Copy link
Owner

(Huh, github destroyed my unicode character after I posted. The wikipedia link should end with the character 🍔 U+1F354 HAMBURGER.)

Edit: It showed up after a refresh. (Note that Chrome does not support emojis yet for some reason)

@ghost
Copy link
Author

ghost commented May 28, 2014

Thanks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant