> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Embedded Sign client

export const Link = ({href, children, className, ...props}) => {
  const [localizedHref, setLocalizedHref] = useState(href);
  const supportedLocales = useMemo(() => ['ja'], []);
  useEffect(() => {
    const getLocaleFromPath = path => {
      const match = path.match(/^\/([a-z]{2})(?:\/|$)/);
      if (match) {
        const potentialLocale = match[1];
        if (supportedLocales.includes(potentialLocale)) {
          return potentialLocale;
        }
      }
      return null;
    };
    const hasLocalePrefix = path => {
      const match = path.match(/^\/([a-z]{2})(?:\/|$)/);
      return match ? supportedLocales.includes(match[1]) : false;
    };
    const currentPath = window.location.pathname;
    const currentLocale = getLocaleFromPath(currentPath);
    if (href && href.startsWith('/') && !hasLocalePrefix(href)) {
      if (currentLocale) {
        setLocalizedHref(`/${currentLocale}${href}`);
      } else {
        setLocalizedHref(href);
      }
    } else {
      setLocalizedHref(href);
    }
  }, [href, supportedLocales]);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

<Link href="/guides/embed/box-embed">Box Embed</Link> allows you to embed Box Sign
features into your own website. This way, users
don't have to leave the website, go to Box Sign
to sign the document, and then come back to finish
the process.
Instead, Box Embed allows them
to complete the signing process
within the external website.

To integrate Box Sign experience within your
own website, you need the `iframable_embed_url`
parameter that is specifically designed to allow
signing documents within the HTML `iframe` tag.

A sample `iframable_embed_url` looks as follows:

```sh  theme={null}
https://app.box.com/embed/sign/document/f14d7098-a331-494b-808b-79bc7f3992a3/f14d7098-a331-494b-808b-79bc7f3992a4
```

To get the `iframeable_embed_url` pass the <Link href="/reference/post-sign-requests#param-signers-embed_url_external_user_id">`embed_url_external_user_id`</Link> parameter for each signer when calling the <Link href="/reference/post-sign-requests">create sign request</Link> endpoint.
The returned response will contain a unique `iframeable_embed_url` for that signer.

To embed Sign features and make them
available to the users,
use the URL within the `iframe` tag:

```sh  theme={null}
<iframe
  src="https://app.box.com/embed/sign/document/f14d7098-a331-494b-808b-79bc7f3992a3/f14d7098-a331-494b-808b-79bc7f3992a4"
  width="{pixels}"
  height="{pixels}"
  frameborder="0"
  allowfullscreen
  webkitallowfullscreen
  msallowfullscreen
></iframe>
```

<Info>
  For details on working with Box Embed, see <Link href="/guides/embed/box-embed#programmatically">this guide</Link>.
</Info>

Box Embed uses the <Link href="/guides/embed/box-embed#cloud-game">Cloud Game</Link> widget to
prevent clickjacking.
In this case, when the user wants to sign
a document, they will have to interact
with the widget and drag a cloud to the correct
location before proceeding to document signing.
