---
schema_version: "1"
id: a917668dfbf40eb157547d9c664825eac56e9d21fdda70a084095766c9af34f8
title: Tableau JavaScript API Concepts--Authentication
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/api/js_api/JavaScriptAPI/js_api_concepts_authentication.md
canonical_url: https://help.tableau.com/v0.0/api/js_api/en-us/JavaScriptAPI/js_api_concepts_authentication.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 5cd971b2cea19febcd8153b08ce43e8cbc580eb31da7aa06ccd0c942ae8b9c90
description: Important changes for the Tableau JavaScript API
---
[Skip to main content](#main-content)

# Authentication

**Important changes for the Tableau JavaScript API**

As of February 2024, the Tableau JavaScript API is deprecated. Use the Embedding API v3 instead for embedding interactive views into web pages and applications. For guidance on embedding Tableau views, see the [Tableau Embedding API v3 Help](https://help.tableau.com/current/api/embedding_api/en-us/index.html).

The normal authentication protocol applies for accessing views on a server. If your code is getting a view from Tableau Public, no authentication is required. However, if your code is getting a view from a hosted instance of Tableau Server, authentication is typically required. If the user is not already signed in to the server, Tableau Server redirects the request for a view to the server sign in page, and the user must provide a username and password. After the user has signed in, the browser caches session information, and the user doesn't have to sign in again unless he or she has explicitly signed out of the server, or until the session token expires.

## Trusted Authentication

If you are working with Tableau Server, and if the server is configured to [use trusted authentication](https://help.tableau.com/current/server/en-us/help.htm#trusted_auth.htm), specify the ticket in the URL by first adding `trusted` after the server name, followed by the ticket. For example:

```
var placeholderDiv = document.getElementById("tableauViz");
var url = "http://tabserver/trusted/Etdpsm_Ew6rJY-9kRrALjauU/views/workbookname/viewname";

var options = {
   hideTabs: true,
   width: "800px",
   height: "700px"
};

var viz = new tableau.Viz(placeholderDiv, url, options);
```

Trusted Authentication is not used with Tableau Cloud.