> For the complete documentation index, see [llms.txt](https://tech.x2bee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.x2bee.com/dev-guide/developer-guide-en/dev-start/markdown/short-url-guide.md).

# Short URL Guide

This document covers how to create a short URL.

{% stepper %}
{% step %}

### Config Setup Method and Verification

application.yml example:

```yaml
shortUrl:
  clientId: fguXF8_4cJHrRgDEIQCJ
  secretKey: dEs5wPqo93
```

{% hint style="info" %}
The `clientId` and `secretKey` properties are issued by the Naver Developers Center.
{% endhint %}
{% endstep %}

{% step %}

### How to Write at Each Business Layer (Sample and Description)

#### Sample Source (Example)

```java
... private final ShortUrl shortUrl;

public ShortUrlResponse shortUrl(String url) throws Exception {
    ShortUrlResponse shortUrlResponse = shortUrl.getShortUrl(url);
    return shortUrlResponse;
}
...
```

If you take the URL information to be shortened as a String, pass it as a parameter to the `getShortUrl` method, and call it, the value is returned as shown in the table below.

| Property         | Type   | Description                                             |
| ---------------- | ------ | ------------------------------------------------------- |
| message          | string | Error message. Returns ok if the response is successful |
| code             | string | HTTP status code                                        |
| result.hash      | string | Hash information of the short URL                       |
| result.url       | string | The shortened URL                                       |
| result.orgUrl    | string | The original URL                                        |
| {% endstep %}    |        |                                                         |
| {% endstepper %} |        |                                                         |
