# shorten

fun shorten(long_url: String, domain: String = Constants.EMPTY, group_guid: String = Constants.EMPTY, toJson: Boolean = false): String(source)

Shortens a long URL.

See the Bit.ly API for more information.

#### Return

The short URL or the long_url on error.

#### Parameters

long_url

The long URL.

domain

A branded short domain or `bit.ly` by default.

group_guid

A GUID for a Bitly group.

toJson

Returns the full JSON response if `true`.