# prov.embed.createLink

prov.embed.createLink in Node SDK. Mint a hosted page link (201): the same body and checks as `createToken`, Pro and up.

## Signature

```ts
prov.embed.createLink(params: CreateEmbedLinkParams): Promise<EmbedLink>
```

## Parameters

- `params` (CreateEmbedLinkParams)

## Returns

`Promise<EmbedLink>`

## HTTP operation

[`POST /v1/embed/links`](https://provenanceauth.com/docs/api/embeds.md#post-v1-embed-links): Create a hosted page link

## Errors

- [`embed_object_kind_mismatch`](https://provenanceauth.com/docs/platform/errors.md#embed_object_kind_mismatch)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rules_embed_rule_missing`](https://provenanceauth.com/docs/platform/errors.md#rules_embed_rule_missing)
- [`trial_ended`](https://provenanceauth.com/docs/platform/errors.md#trial_ended)

## Example

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/capture_requests`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x", "Content-Type": "application/json" },
  body: JSON.stringify({ "case_id": "LMB-20418", "delivery": "self", "session_type": "id" }),
})).json();
const captureRequestId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/links`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "widget": "capture_result",
    "object_id": captureRequestId,
    "show": [
      "case_id"
    ]
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/attest/capture_requests", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}, json={
    "case_id": "LMB-20418",
    "delivery": "self",
    "session_type": "id"
}).json()
capture_request_id = step1["id"]
data = httpx.post(f"{api}/v1/embed/links", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}, json={
    "widget": "capture_result",
    "object_id": capture_request_id,
    "show": [
        "case_id"
    ]
}).json()
```
