> For the complete documentation index, see [llms.txt](https://developers-apps-in-toss.toss.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-en/common/growth/share/miniapp-share-link.md).

# Mini App Share Link

`getTossShareLink` The function converts a user-defined path **into a share link that can be opened in the Toss app**If you send this link to someone else, the Toss app will launch and **move directly to the specified deep-link screen**You can.

If the Toss app is not installed, it works as follows.

* iOS → **App Store**go to
* Android → **Play Store**go to

The path should point to an internal Toss app screen **deep link** format. For example, you can write it as below.

```
intoss://<app name>
intoss://<app name>/about?name=test
```

Also `ogImageUrl`If you specify it, when shared on external platforms such as SNS and messengers, the **preview (OG image)** can be set directly. Because OG images are cropped and cached differently depending on the platform, please follow the guidelines below so they are displayed as intended when shared.

* The image URL must start with `https://`a **absolute path**must.
* **Recommended size by platform** · `For detailed rules such as aspect ratio, file format, and file size, check the OG image rules in the internal documentation and apply them.`

If OG images are configured incorrectly, the preview may appear different from what you intended, or may not appear at all on some platforms, so please be careful.

{% hint style="info" %}
**Cache notes**

External platforms cache OG metadata (image/title/description), so changes to a link that has already been shared may not be reflected immediately. If you need them reflected sooner, use the **debugger tool**provided by each platform to clear the cache directly.

* Kakao Debugger → <https://developers.kakao.com/tool/debugger/sharing>
* Facebook Debugger → <https://developers.facebook.com/tools/debug/>
  {% endhint %}

**Signature**

```typescript
function getTossShareLink(url: string, ogImageUrl?: string): Promise<string>;
```

**Parameters**

* **url** · Required

  This is the path you want to open with a deep link. `intoss://` must be a string that starts with
* ogImageUrl string

  The image URL to display in the preview (OG) when shared. `https://` must be an absolute path that starts with

**Return value**

* `Promise<string>`

  `deep_link_value`Returns a Toss share link containing

**Example**

{% tabs %}
{% tab title="js" %}

```js
import { share, getTossShareLink } from '@apps-in-toss/web-framework';

async function handleShare() {
  const tossLink = await getTossShareLink(
    'intoss://my-app',
    'https://static.toss.im/icons/png/4x/icon-share-dots-mono.png',
  );

  // Share the generated link as a message.
  await share({ message: tossLink });
}
```

{% endtab %}

{% tab title="React" %}

```tsx
import { share, getTossShareLink } from '@apps-in-toss/web-framework';
import { Button } from '@toss/tds-mobile';

function ShareButton() {
  async function handleClick() {
    const tossLink = await getTossShareLink(
      'intoss://my-app',
      'https://static.toss.im/icons/png/4x/icon-share-dots-mono.png',
    );

    // Share the generated link as a message.
    await share({ message: tossLink });
  }

  return <Button onClick={handleClick}>Share</Button>;
}
```

{% endtab %}

{% tab title="React Native" %}

```tsx
import { share, getTossShareLink } from '@apps-in-toss/framework';
import { Button } from '@toss/tds-react-native';

function ShareButton() {
  async function handleClick() {
    const tossLink = await getTossShareLink(
      'intoss://my-app',
      'https://static.toss.im/icons/png/4x/icon-share-dots-mono.png',
    );

    // Share the generated link as a message.
    await share({ message: tossLink });
  }

  return <Button onPress={handleClick}>Share</Button>;
}
```

{% endtab %}
{% endtabs %}

**Try the sample app**

[apps-in-toss-examples](https://github.com/toss/apps-in-toss-examples) from the repository [with-share-link](https://github.com/toss/apps-in-toss-examples/tree/main/with-share-link) Download the code, or scan the QR code below to try it yourself.

QR code link: intoss\://with-share-link

### Test guide before app launch

`intoss://` The scheme **is accessible only after the app is officially launched.** For testing features before launch, you must use the **test scheme (QR code)** generated on upload.

**① In the QR code `deploymentId` check**

A new `deploymentId`is issued every time you upload an app bundle. In the test scheme, `_deploymentId` is a required parameter.

Example:

```
intoss-private://appsintoss?_deploymentId=0198c000-68c3-7d2b-0000-2c00000005ec
```

**② Test by applying path/query to the scheme**

* When a subpath is applied:

```
intoss-private://appsintoss/path/pathpath?_deploymentId=0198c000-68c3-7d2b-0000-2c00000005ec
```

* When applying query parameters: queryParams must be URL-encoded.

```
intoss-private://appsintoss?_deploymentId=0198c000-68c3-7d2b-0000-2c00000005ec&queryParams=%7B%22categoryKey%22%3A%22
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-en/common/growth/share/miniapp-share-link.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
