Loading

Intermittent HTTP 401or 403 Errors Using the Tableau REST API

Udgivelsesdato: Aug 25, 2025
Beskrivelse

When making calls with the REST API, 400-level error responses are intermittently received, typically HTTP 401 or 403.

The response may look similar to the following:

<?xml version='1.0' encoding='UTF-8'?> 
tsResponse xmlns="http://tableau.com/api" xmlns:xsi="http://ww.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://help.tableau.com/samples/en-us/rest_api/ts-api_3_24.xsd"> 
<error code="401000"> 
<summary>Unauthorized Access</summary> 
<detail>No authentication credentials were provided</detail> 
</error> 
</tsResponse>

Cause

Intermittent 4xx errors when using the REST API are typically caused by using an authentication token after the session has expired. 

Løsning
  • Ensure that the REST API code retrieves a new authentication token often enough to avoid the session timeout limit on Tableau Cloud or Tableau Server.
  • The Sign In call returns a credentials token that you use in subsequent calls to Tableau Server or Tableau Cloud. Typically, a credentials token is valid for 240 minutes on Tableau Server, and 120 minutes on Tableau Cloud. With administrator permissions on Tableau Server, you can change this timeout by using the tsm configuration set command and setting the wgserver.session.idle_limit option.
  • If your application needs to make additional calls after the token has expired, you can call Sign In again and get a new authentication token.
  • See REST API Reference Authentication Methods for more information about Sign in and Sign Out methods.
Yderligere ressourcer
  • In the case of consistent 401 OR 403 errors, likely there is either no valid authentication token passed with the request, or the call is for a site that differs from the user's login session (Tableau Server only).
  • If HTTP 400 errors are received, this response indicates that there is a bad request and not an authentication issue. Be sure to check the body of your request to ensure that all content is accurate and in the correct place. Refer to the REST API documentation for syntax requirements and common error responses for different REST methods.
  • For more information about interpreting and troubleshooting errors in the REST API, see Handling Errors in the REST API
Vidensartikelnummer

001498381

 
Indlæser
Salesforce Help | Article