---
schema_version: "1"
id: 019ff2eea9266e1242583c98a0a55ded1df5812f9f3f71c0c334a7d3428e5322
title: AuthoringViz | Tableau Embedding API
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/api/embedding_api/reference/interfaces/AuthoringViz.md
canonical_url: https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/AuthoringViz.html
source_site: help.tableau.com
content_type: documentation
content_hash: eea86bdb58aaed7601573add4fd28e423d7483a45d8572df0916378bbc17db94
description: Documentation for Tableau Embedding API
---
- AuthoringViz

# Interface AuthoringViz

The interface for the top level Authoring Viz object.

interface AuthoringViz {  
    [debug](#debug)?: boolean;  
    [height](#height)?: string | number;  
    [hideCloseButton](#hideclosebutton)?: boolean;  
    [hideEditInDesktopButton](#hideeditindesktopbutton)?: boolean;  
    [iframeAttributeClass](#iframeattributeclass)?: string;  
    [iframeAttributeLoading](#iframeattributeloading)?: string;  
    [iframeAttributeStyle](#iframeattributestyle)?: string;  
    [iframeAuth](#iframeauth)?: boolean;  
    [onEditInDesktopButtonClicked](#oneditindesktopbuttonclicked)?: string;  
    [onFirstInteractive](#onfirstinteractive)?: string;  
    [onFirstVizSizeKnown](#onfirstvizsizeknown)?: string;  
    [onWorkbookPublished](#onworkbookpublished)?: string;  
    [onWorkbookPublishedAs](#onworkbookpublishedas)?: string;  
    [onWorkbookReadyToClose](#onworkbookreadytoclose)?: string;  
    [src](#src)?: null | string;  
    [suppressDefaultEditBehavior](#suppressdefaulteditbehavior)?: boolean;  
    [token](#token)?: string;  
    [touchOptimize](#touchoptimize)?: boolean;  
    [width](#width)?: string | number;  
    [getCurrentSrcAsync](#getcurrentsrcasync-1)(): Promise<string\>;  
    [getVizQLDataServiceSessionInfo](#getvizqldataservicesessioninfo-1)(): [VizQLDataServiceSessionInfo](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizQLDataServiceSessionInfo.html);  
    [isAnalyticsAssistantAvailableAsync](#isanalyticsassistantavailableasync-1)(): Promise<boolean\>;  
    [launchAnalyticsAssistantAsync](#launchanalyticsassistantasync-1)(): Promise<void\>;  
    [resize](#resize-1)(): void;  
    [setAuthToken](#setauthtoken-1)(token: string): void;  
}

#### Hierarchy ([View Summary](https://help.tableau.com/current/api/embedding_api/en-us/reference/hierarchy.html#AuthoringViz))

- [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html)
- [WebComponentLocalSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/WebComponentLocalSettings.html)
    - AuthoringViz

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:119

##### Index

### Methods

[getCurrentSrcAsync](#getcurrentsrcasync) [getVizQLDataServiceSessionInfo](#getvizqldataservicesessioninfo) [isAnalyticsAssistantAvailableAsync](#isanalyticsassistantavailableasync) [launchAnalyticsAssistantAsync](#launchanalyticsassistantasync) [resize](#resize) [setAuthToken](#setauthtoken)

### Properties

[debug?](#debug) [height?](#height) [hideCloseButton?](#hideclosebutton) [hideEditInDesktopButton?](#hideeditindesktopbutton) [iframeAttributeClass?](#iframeattributeclass) [iframeAttributeLoading?](#iframeattributeloading) [iframeAttributeStyle?](#iframeattributestyle) [iframeAuth?](#iframeauth) [onEditInDesktopButtonClicked?](#oneditindesktopbuttonclicked) [onFirstInteractive?](#onfirstinteractive) [onFirstVizSizeKnown?](#onfirstvizsizeknown) [onWorkbookPublished?](#onworkbookpublished) [onWorkbookPublishedAs?](#onworkbookpublishedas) [onWorkbookReadyToClose?](#onworkbookreadytoclose) [src?](#src) [suppressDefaultEditBehavior?](#suppressdefaulteditbehavior) [token?](#token) [touchOptimize?](#touchoptimize) [width?](#width)

## Methods

### getCurrentSrcAsync[](#getcurrentsrcasync)

- getCurrentSrcAsync(): Promise<string\>[](#getcurrentsrcasync-1)
    
    Gets the visualization's current URL.
    
    #### Returns Promise<string\>
    
    - Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:123

### getVizQLDataServiceSessionInfo[](#getvizqldataservicesessioninfo)

- getVizQLDataServiceSessionInfo(): [VizQLDataServiceSessionInfo](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizQLDataServiceSessionInfo.html)[](#getvizqldataservicesessioninfo-1)
    
    Gets the server session information for use with VizQL Data Service. The server session information contains the VizQL Server Session ID (X-Session-Id) and the Global Session Header (Global-Session-Header).
    
    #### Returns [VizQLDataServiceSessionInfo](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizQLDataServiceSessionInfo.html)
    
    - Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:165

### isAnalyticsAssistantAvailableAsync[](#isanalyticsassistantavailableasync)

- isAnalyticsAssistantAvailableAsync(): Promise<boolean\>[](#isanalyticsassistantavailableasync-1)
    
    Indicates whether the Analytics Assistant side pane is available.
    
    #### Returns Promise<boolean\>
    
    - Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:159

### launchAnalyticsAssistantAsync[](#launchanalyticsassistantasync)

- launchAnalyticsAssistantAsync(): Promise<void\>[](#launchanalyticsassistantasync-1)
    
    Use this method to launch the Analytics Assistant side pane. You can use the `isAnalyticsAssistantAvailableAsync()` method to check if the Analytics Assistant is available for use.
    
    ```
    const isAnalyticsAssistantAvailable = await viz.isAnalyticsAssistantAvailableAsync();if (isAnalyticsAssistantAvailable) {  await viz.launchAnalyticsAssistantAsync();}
    ```
    
    #### Returns Promise<void\>
    
    - Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:154

### resize[](#resize)

- resize(): void[](#resize-1)
    
    Use this method to readjust the dimensions of the embedded viz in response to things like a window resize, device orientation change, or parent container resize.
    
    ```
    window.addEventListener('resize', () => viz.resize());new ResizeObserver(() => viz.resize()).observe(viz.parentElement);
    ```
    
    #### Returns void
    
    - Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:141

### setAuthToken[](#setauthtoken)

- setAuthToken(token: string): void[](#setauthtoken-1)
    
    Provide an auth token for salesforce native mode
    
    #### Parameters
    
    - token: string
    
    #### Returns void
    
    - Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:129

## Properties

### `Optional`debug[](#debug)

debug?: boolean

Indicates whether the non-minified version of JavaScript is loaded. If specified (or set to true), the non-minified version is used for both the local component and the Tableau Server visualization (if enabled). If not specified (or set to false), the minified version of the JavaScript files are loaded.

```
<tableau-viz id="tableauViz" debug /><tableau-authoring-viz id="tableauViz" debug /><tableau-ask-data id="tableauAskData" debug />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[debug](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#debug)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/WebComponentInterfaces.ts:50

### `Optional`height[](#height)

height?: string | number

Represents height in pixels Can be any valid CSS size specifier. If not specified, defaults to the published height of the view.

Inherited from [WebComponentLocalSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/WebComponentLocalSettings.html).[height](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/WebComponentLocalSettings.html#height)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/WebComponentInterfaces.ts:20

### `Optional`hideCloseButton[](#hideclosebutton)

hideCloseButton?: boolean

Indicates whether the Close button is hidden or visible. If not set, defaults to false, meaning that the Close button is visible.

```
<tableau-authoring-viz id="tableauViz" hide-close-button />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[hideCloseButton](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#hideclosebutton)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:693

### `Optional`hideEditInDesktopButton[](#hideeditindesktopbutton)

hideEditInDesktopButton?: boolean

Indicates whether the Edit in Desktop button is hidden or visible. If not specified, defaults to false, meaning that the Edit in Desktop button is visible.

```
<tableau-viz id="tableauViz" hide-edit-in-desktop-button><tableau-authoring-viz id="tableauViz" hide-edit-in-desktop-button>
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[hideEditInDesktopButton](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#hideeditindesktopbutton)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:457

### `Optional`iframeAttributeClass[](#iframeattributeclass)

iframeAttributeClass?: string

The value of the 'class' attribute of the embedded iframe providing access to any custom selectors defined in the `<iframe-style>` child tag.

```
<tableau-viz id="tableauViz" iframe-attr-class="red-border">  <iframe-style>    .red-border {      border: 1px solid red;    }  </iframe-style></tableau-viz>
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[iframeAttributeClass](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#iframeattributeclass)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/WebComponentInterfaces.ts:101

### `Optional`iframeAttributeLoading[](#iframeattributeloading)

iframeAttributeLoading?: string

The value of the 'loading' attribute of the embedded iframe. See: [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#loading](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#loading)

```
<tableau-viz id="tableauViz" iframe-attr-loading="lazy" /><tableau-authoring-viz id="tableauViz" iframe-attr-loading="lazy" /><tableau-pulse id="tableauPulse" iframe-attr-loading="lazy" />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[iframeAttributeLoading](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#iframeattributeloading)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/WebComponentInterfaces.ts:74

### `Optional`iframeAttributeStyle[](#iframeattributestyle)

iframeAttributeStyle?: string

The value of the 'style' attribute of the embedded iframe.

```
<tableau-viz id="tableauViz" iframe-attr-style="border: 1px solid red" /><tableau-authoring-viz id="tableauViz" iframe-attr-style="border: 1px solid red" /><tableau-pulse id="tableauPulse" iframe-attr-style="border: 1px solid red" />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[iframeAttributeStyle](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#iframeattributestyle)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/WebComponentInterfaces.ts:85

### `Optional`iframeAuth[](#iframeauth)

iframeAuth?: boolean

Indicates whether to use the old auth mechanism for authentication which happens inside the iframe. If specified, VizLoadErrorEvents triggered due to auth failures will not be thrown.

```
<tableau-viz id="tableauViz" iframe-auth /><tableau-authoring-viz id="tableauViz" iframe-auth /><tableau-ask-data id="tableauAskData" iframe-auth />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[iframeAuth](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#iframeauth)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/WebComponentInterfaces.ts:62

### `Optional`onEditInDesktopButtonClicked[](#oneditindesktopbuttonclicked)

onEditInDesktopButtonClicked?: string

An event raised when the user clicks on the Edit In Desktop Button. You can use this event type with TableauViz objects.

```
<tableau-viz id="tableauViz" onEditInDesktopButtonClicked="onEditInDesktopButtonClickedHandler" /><tableau-authoring-viz id="tableauViz" onEditInDesktopButtonClicked="onEditInDesktopButtonClickedHandler" />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[onEditInDesktopButtonClicked](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#oneditindesktopbuttonclicked)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:477

### `Optional`onFirstInteractive[](#onfirstinteractive)

onFirstInteractive?: string

An event raised when the Viz object first becomes interactive. This is only raised once.

```
<tableau-viz id="tableauViz" "onFirstInteractive"="onFirstInteractiveHandler" /><tableau-authoring-viz id="tableauViz" onFirstInteractive="onFirstInteractiveHandler" />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[onFirstInteractive](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#onfirstinteractive)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:496

### `Optional`onFirstVizSizeKnown[](#onfirstvizsizeknown)

onFirstVizSizeKnown?: string

An event raised when the size of the viz is known. You can use this event to perform tasks such as resizing the elements surrounding the Viz object once the object's size has been established.

```
<tableau-viz id="tableauViz" "onFirstVizSizeKnown"="onFirstVizSizeKnownHandler" /><tableau-authoring-viz id="tableauViz" onFirstVizSizeKnown="onFirstVizSizeKnownHandler" />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[onFirstVizSizeKnown](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#onfirstvizsizeknown)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:487

### `Optional`onWorkbookPublished[](#onworkbookpublished)

onWorkbookPublished?: string

An event raised when the workbook has been published. This notification is sent when using embedded web authoring functionality.

```
<tableau-authoring-viz id="tableauViz" onWorkbookPublished="onWorkbookPublishedHandler" />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[onWorkbookPublished](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#onworkbookpublished)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:701

### `Optional`onWorkbookPublishedAs[](#onworkbookpublishedas)

onWorkbookPublishedAs?: string

An event raised when "publish as" is successful. This notification is sent when using embedded web authoring functionality.

```
<tableau-authoring-viz id="tableauViz" onWorkbookPublishedAs="onWorkbookPublishedAsHandler" />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[onWorkbookPublishedAs](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#onworkbookpublishedas)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:709

### `Optional`onWorkbookReadyToClose[](#onworkbookreadytoclose)

onWorkbookReadyToClose?: string

An event raised when the workbook is ready to close. This notification is sent when using embedded web authoring functionality.

```
<tableau-authoring-viz id="tableauViz" onWorkbookReadyToClose="onWorkbookReadyToCloseHandler" />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[onWorkbookReadyToClose](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#onworkbookreadytoclose)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:717

### `Optional`src[](#src)

src?: null | string

The viz src

Inherited from [WebComponentLocalSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/WebComponentLocalSettings.html).[src](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/WebComponentLocalSettings.html#src)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/WebComponentInterfaces.ts:8

### `Optional`suppressDefaultEditBehavior[](#suppressdefaulteditbehavior)

suppressDefaultEditBehavior?: boolean

Indicates whether the default edit behavior is suppressed. If not specified, defaults to false, meaning that the default edit behavior is not suppressed.

```
<tableau-viz id="tableauViz" suppress-default-edit-behavior><tableau-authoring-viz id="tableauViz" suppress-default-edit-behavior>
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[suppressDefaultEditBehavior](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#suppressdefaulteditbehavior)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:468

### `Optional`token[](#token)

token?: string

The token used for authorization

```
<tableau-viz id="tableauViz" token="some-token-containing-clientId" /><tableau-authoring-viz id="tableauViz" token="some-token-containing-clientId" /><tableau-ask-data id="tableauAskData" token="some-token-containing-clientId" />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[token](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#token)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/WebComponentInterfaces.ts:37

### `Optional`touchOptimize[](#touchoptimize)

touchOptimize?: boolean

Indicates whether to touch optimize viz controls.

```
<tableau-viz id="tableauViz" touch-optimize /><tableau-authoring-viz id="tableauViz" touch-optimize />
```

Inherited from [VizAuthoringSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html).[touchOptimize](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/VizAuthoringSettings.html#touchoptimize)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/VizInterfaces.ts:446

### `Optional`width[](#width)

width?: string | number

Represents width in pixels Can be any valid CSS size specifier. If not specified, defaults to the published width of the view.

Inherited from [WebComponentLocalSettings](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/WebComponentLocalSettings.html).[width](https://help.tableau.com/current/api/embedding_api/en-us/reference/interfaces/WebComponentLocalSettings.html#width)

- Defined in packages/api-external-contract-js/src/ExternalContract/Embedding/WebComponentInterfaces.ts:14

### Settings

Member Visibility

- Protected
- Inherited
- External

ThemeOSLightDark

### On This Page

Methods

[getCurrentSrcAsync](#getcurrentsrcasync)[getVizQLDataServiceSessionInfo](#getvizqldataservicesessioninfo)[isAnalyticsAssistantAvailableAsync](#isanalyticsassistantavailableasync)[launchAnalyticsAssistantAsync](#launchanalyticsassistantasync)[resize](#resize)[setAuthToken](#setauthtoken)

Properties

[debug](#debug)[height](#height)[hideCloseButton](#hideclosebutton)[hideEditInDesktopButton](#hideeditindesktopbutton)[iframeAttributeClass](#iframeattributeclass)[iframeAttributeLoading](#iframeattributeloading)[iframeAttributeStyle](#iframeattributestyle)[iframeAuth](#iframeauth)[onEditInDesktopButtonClicked](#oneditindesktopbuttonclicked)[onFirstInteractive](#onfirstinteractive)[onFirstVizSizeKnown](#onfirstvizsizeknown)[onWorkbookPublished](#onworkbookpublished)[onWorkbookPublishedAs](#onworkbookpublishedas)[onWorkbookReadyToClose](#onworkbookreadytoclose)[src](#src)[suppressDefaultEditBehavior](#suppressdefaulteditbehavior)[token](#token)[touchOptimize](#touchoptimize)[width](#width)