> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/management-api/workspace-api/signed-token-api.md).

# Signed token API

Generate a pre-signed sign-in URL for an [embedded user](https://docs.nected.ai/nected-docs/embedded-system/embeddable-view). Open the URL, or load it in an iframe, and the user lands in Nected already signed in, with no separate login step.

{% hint style="info" %}
**Before you call this API**, add the person as an embedded user: go to **Workspace settings → Embedded Users**, enter their email, choose a role and click **Add User**. The full setup, including iframe embedding, hiding features and logout, is in the [Embeddable View guide](https://docs.nected.ai/nected-docs/embedded-system/embeddable-view).
{% endhint %}

## Generate an embedded sign-in URL

> Returns a pre-signed sign-in URL for the given user email.\
> \
> The URL expires \*\*5 minutes\*\* after it is issued. Generate it just before you need it, and call this endpoint again to get a fresh URL.\
> \
> To land the user on a specific page after sign-in, append a path to the \`redirect\` query parameter of the returned URL, for example \`redirect=/rules\` or \`redirect=/workflow\`.

```json
{"openapi":"3.0.3","info":{"title":"Nected Management API — Embedded Sign-in URL","version":"1.0"},"tags":[{"name":"Workspace","description":"Workspace-level APIs."}],"servers":[{"url":"https://api.nected.ai","description":"Production"}],"paths":{"/dev/v1/signed-token":{"get":{"operationId":"getEmbeddedSignInUrl","tags":["Workspace"],"summary":"Generate an embedded sign-in URL","description":"Returns a pre-signed sign-in URL for the given user email.\n\nThe URL expires **5 minutes** after it is issued. Generate it just before you need it, and call this endpoint again to get a fresh URL.\n\nTo land the user on a specific page after sign-in, append a path to the `redirect` query parameter of the returned URL, for example `redirect=/rules` or `redirect=/workflow`.","parameters":[{"name":"Nected-API-Key","in":"header","required":true,"description":"Your Nected API key.","schema":{"type":"string"}},{"name":"email","in":"query","required":true,"description":"Email address of the embedded user the URL is issued for.","schema":{"type":"string","format":"email"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedTokenSuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"SignedTokenSuccessResponse":{"type":"object","required":["code","message","data"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/SignedTokenData"}}},"SignedTokenData":{"type":"object","required":["signedURL"],"properties":{"signedURL":{"type":"string","format":"uri","description":"Sign-in URL containing the signed token. Expires 5 minutes after it is issued. May end with an empty `redirect=` parameter that you can fill in with the page to open after sign-in."}}},"Response":{"type":"object","description":"Standard API response wrapper.","properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","nullable":true},"pageNo":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"},"totalPages":{"type":"integer"}}}}}}
```

### Good to know

* **The URL expires after 5 minutes.** Generate it right before you use it, don't store or cache it, and request a new one for each session.
* **Choose the landing page** with the `redirect` parameter on the returned URL. Use `/rules` for rule management or `/workflow` for the workflow dashboard.
* **Iframe embedding works on self-hosted deployments only.** SaaS deployments can't embed Nected in an iframe because of cross-domain restrictions.
* **Keep your API key on your server.** Call this API from your backend, never from browser code.

If a user opens a URL that has expired, they'll see an invalid signed token error. Call this API again for a new URL.

### Read More

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4>Embeddable View</h4></td><td>Read this guide to add embedded users, embed with an iframe, hide features, and handle logout.</td><td><a href="/nected-docs/embedded-system/embeddable-view.md">Embeddable View</a></td></tr></tbody></table>
