
API KEYS:
-------------------------------
Every request needs the apiKey parameter. Requests run as the key's owner
and their permissions apply. Per-role rate limits (shurly_throttle) are
currently not enforced.

There is no user interface to create keys. Create one programmatically:
\Drupal::moduleHandler()->loadInclude('shurly_service', 'inc', 'shurly_api_keys');
shurly_generate_new_api_key($uid);


SHORTENING A URL:
-------------------------------
Returns JSON. The key's owner must be active and have the
"create short URLs" permission, otherwise the request is denied (403).

https://example.com/shurly/api/shorten?longUrl=https://www.drupal.org&apiKey=YOUR_API_KEY

Owners with the "Request custom short URL" permission can pass a desired
short URL with the shortUrl parameter.


EXPANDING A URL:
-------------------------------
Returns JSON with the long URL. The key's owner must have the
"Expand short URLs" permission, otherwise the response is an
"Invalid API key" error.

https://example.com/shurly/api/expand?shortUrl=https://example.com/Zk5&apiKey=YOUR_API_KEY
