Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master


latest commit d779e25c7a
Burt Beckwith authored
Failed to load latest commit information.
.settings initial commit
grails-app cleanup
test/unit/com/grails/plugins/bitly cleanup
.classpath cleanup
.gitignore added .gitignore
.project cleanup
BitlyShortenerGrailsPlugin.groovy cleanup
LICENSE.txt added WTFPL license fixed some typos in the doc cleanup

What's this?

This is a grails plugin that is a wrapper for shorten API method. To short urls.


grails install-plugin bitly-shortener


In Config.groovy should be configured login, apiKey; and optionally the custom domain (may be your own domain if you have a premium account).

bitly.login = "danilat"
bitly.apiKey = "R_FooBar"
bitly.domain = "" //optional

How to

There are 2 grails grails artifacts, a service bitlyService:

def shortened = bitlyService.shorten("")
shortened.statusCode // 200 if all is ok, error code if not.
shortened.statusText // "OK" if all is ok, error message if not.
shortened.url // The shortened url if all is ok.

A taglib bitly:shorten:

<bitly:shorten url=""/ >
Something went wrong with that request. Please try again.