# App Links Developer Guide

## **Overview** <a href="#applinksdeveloperguide-overview" id="applinksdeveloperguide-overview"></a>

This guide describes URL Scheme connection and various APIs of the ONE store App.

### **URL Scheme Connection of ONE store App** <a href="#applinksdeveloperguide-urlschemeconnectionofonestoreapp" id="applinksdeveloperguide-urlschemeconnectionofonestoreapp"></a>

* You can use URL scheme to open an app download page of ONE store in your mobile apps and browsers. Strings like `http://`, `ftp://`, `market:`// are called `URL scheme’` The way to execute an App via the URL scheme is as follows:
  * A URL scheme is passed to Android system when a user clicks a hyperlink with it in an app or a web page
  * The system checks whether there is an app installed in the device which is directly executable through the URL scheme
  * If there is one, the system runs the app, passing over the URL scheme
  * While being executed, the app would perform certain features by referring to the contents included in the URL scheme.

{% hint style="success" %}
If you use the URL scheme through a mobile browser, you would need to implement an exception handling feature just in case ONE store is not installed in a device
{% endhint %}

### **URL Scheme Configuration** <a href="#applinksdeveloperguide-urlschemeconfiguration" id="applinksdeveloperguide-urlschemeconfiguration"></a>

* For more on each call specification, refer to Tools [Reference.](https://onestore-dev.gitbook.io/dev/eng/tools/app-links/reference)

### **App/Game Detail Call** <a href="#applinksdeveloperguide-app-gamedetailcall" id="applinksdeveloperguide-app-gamedetailcall"></a>

* In Product View, the clients of each mobile operator move to ‘See Details’ screen for the corresponding PID (‘See Details’ screen of a single product).

{% tabs %}
{% tab title="Specification" %}
`onestore://common/product/{상품PID}`
{% endtab %}

{% tab title="Sample" %}
`onestore://common/product/0000252337`
{% endtab %}
{% endtabs %}

* #### **Search Call** <a href="#applinksdeveloperguide-searchcall" id="applinksdeveloperguide-searchcall"></a>
  * In Search View, the ONE store App shows the search result screen for the corresponding query.

{% tabs %}
{% tab title="Specification" %}
`onestore://common/search/{query}`
{% endtab %}

{% tab title="Sample" %}
`onestore://common/search/naver app`<br>
{% endtab %}
{% endtabs %}

* #### Request Update (Automatic Installation) <a href="#applinksdeveloperguide-requestupdate-automaticinstallation" id="applinksdeveloperguide-requestupdate-automaticinstallation"></a>
  * If the corresponding product is not the latest version, the updated version is automatically downloaded and installed at the update request of App/game products. The update works when the package name of the product to request update does match the package name of the product to be downloaded.

{% tabs %}
{% tab title="Specification" %}
`onestore://common/product/bg_update/{PID}`
{% endtab %}

{% tab title="Sample" %}
`onestore://common/product/bg_update/0000252337`
{% endtab %}
{% endtabs %}

### **Connection to Shorten URLs** <a href="#applinksdeveloperguide-connectiontoshortenurls" id="applinksdeveloperguide-connectiontoshortenurls"></a>

* You can easily generate a connection address of App detail page by using PID.

  Specification

{% tabs %}
{% tab title="Specification" %}
`https://onesto.re/{PID}`
{% endtab %}

{% tab title="Sample" %}
`https://onesto.re/0000252337`
{% endtab %}
{% endtabs %}

{% hint style="success" %}
Process Redirects of Current Specification

The current connection specification individually used in each store is automatically redirected. That means, an additional development is separately needed for the currently published products.
{% endhint %}

| Current Spec.                                                                                                                                                                                                       | Redirect                                                                                                                                                                                                            | New Spec.                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2Ftdj5ZuQP21dkNWzWDbX3%2Fimage.png?alt=media\&token=6aec6c27-3de8-47cd-a1e7-9e92e1daf63c) | ![](https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2Fd6gIAMg6zGo4AyVHlnTD%2Fimage.png?alt=media\&token=71e13adc-91a3-43b8-a53f-38f738f9ae8b) | ![](https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2Fr6MpTUvS31whdfogtYi8%2Fimage.png?alt=media\&token=5f6fd5fb-60be-46f3-a9e3-b085e781ee77) |

### **Server side API** <a href="#applinksdeveloperguide-serversideapi" id="applinksdeveloperguide-serversideapi"></a>

* #### **Check PID & Version Name with packageName** <a href="#applinksdeveloperguide-checkpid-and-versionnamewithpackagename" id="applinksdeveloperguide-checkpid-and-versionnamewithpackagename"></a>
  * The API must be called using the **GET** method.
  * If the product has already been launched, you can check PID and a range of information with packageName openAPI
  * For more detail, refer to Tool [Reference.](https://onestore-dev.gitbook.io/dev/eng/tools/app-links/reference)

{% tabs %}
{% tab title="Request Specification" %}
`GET https://oneapi.onestore.net/api/devcenter/getAppVersion/v1?pkgNm={package name}&deviceModelCd={model name}&osVer={OS version}&sdkVersion={SDK version}`
{% endtab %}

{% tab title="Request Sample" %}
`https://oneapi.onestore.net/api/devcenter/getAppVersion/v1?pkgNm=com.nexon.bluearchiveone&deviceModelCd=SM-N960N&osVer=11.0&sdkVersion=30`
{% endtab %}

{% tab title="Response Sample" %}

```java
{
    "result": {
            "code": "000",
            "desc": "success"
    },
    "prodId": "0000758646",
    "verNm": "1.36.120365",    
    "verCd": "120365",    
    "title": "블루 아카이브",    
    "topMenuId": "DP01",    
    "topMenuNm": "게임",    
    "menuId": "DP01004",    
    "menuNm": "롤플레잉",    
    "sellerNm": "(주) 넥슨",    
    "game": true
}
```

{% endtab %}
{% endtabs %}
