Generate an authenticated URL for an HTTP service running in a sandbox.
Without access, mints a short-lived token and returns a ServiceUrl
that refreshes it as it nears expiry. With access set to "restricted"
or "workspace" the URL is gated by LangSmith login instead and a
ServiceLoginUrl is returned: no token, no expiry, browser only.
A login grant is durable, so token mode is refused with 409 while one is
in place, and expiresInSeconds does not apply to the login modes.
embedOrigins names the pages allowed to show the URL in an iframe,
besides LangSmith itself: at most 5, each https://host[:port] (http
only on localhost). In token mode they are signed into each token, so
every refresh keeps them; load ServiceUrl.embedUrl in the frame.
With access they are stored on the grant, and each call replaces the
grant's list.
serviceUrl(name: string, options: __type): Promise<ServiceUrl | ServiceLoginUrl>| Name | Type | Description |
|---|---|---|
name* | string | |
options* | __type |