---
schema_version: "1"
id: 84733824095122ad8d74293cd0fa8ea77b692f8f2bd036fe38378c19bd3046e1
title: Connector | @tableau/taco-toolkit - v2.1.0
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/api/webdataconnector/reference/classes/app.Connector.md
canonical_url: https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html
source_site: help.tableau.com
content_type: documentation
content_hash: fc3b1343ff0796d62be20b9b1be480f483f057e73b18443db0e4b7fc44f7d683
description: Documentation for @tableau/taco-toolkit
---
- [@tableau/taco-toolkit](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/index.html)
- [app](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/modules/app.html)
- [Connector](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html)

# Class Connector

The Connector class is a facade class used to talk with the eps main server.

#### Hierarchy

- Connector

##### Index

### Constructors

[constructor](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html#constructor)

### Properties

[appSnapshot?](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html#appSnapshot) [handlerInputs?](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html#handlerInputs) [secrets](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html#secrets)

### Accessors

[oAuthCredentials](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html#oAuthCredentials)

### Methods

[cancel](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html#cancel) [get](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html#get) [post](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html#post) [submit](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html#submit)

## Constructors

### constructor[](#constructor)

- new Connector(onInitSuccess?, onInitFailure?): [Connector](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html)[](#constructor.new_Connector)
- #### Parameters
    
    - ##### onInitSuccess: ((connector) => void) = onInitSuccessDefault
        
        - - (connector): void
            - #### Parameters
                
                - ##### connector: [Connector](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html)
                
                #### Returns void
    - ##### onInitFailure: ((connector, err) => void) = onInitFailureDefault
        
        - - (connector, err): void
            - #### Parameters
                
                - ##### connector: [Connector](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html)
                - ##### err: Error
                
                #### Returns void
    
    #### Returns [Connector](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.Connector.html)

## Properties

### `Optional` appSnapshot[](#appSnapshot)

appSnapshot?: object

### `Optional` handlerInputs[](#handlerInputs)

handlerInputs?: [HandlerInput](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/types/app.HandlerInput.html)<any\>\[\]

Property to set an array of [HandlerInput](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/types/app.HandlerInput.html) instances to be transmitted to connector handlers from the connector app.

Don’t transmit sensitive information through `handlerInputs` because it could be susceptible to logging and internal storage.

### secrets[](#secrets)

secrets: undefined | [SecretsType](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/types/app.SecretsType.html)

Property is used to transmit sensitive information to connector handlers from the connector app.

In Tableau apps, Secrets are excluded from storage within saved workbooks. Secrets are securely retained in Tableau Server’s keychain.

## Accessors

### oAuthCredentials[](#oAuthCredentials)

- get oAuthCredentials(): [OAuthCredentials](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.OAuthCredentials.html)
- #### Returns [OAuthCredentials](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/classes/app.OAuthCredentials.html)

## Methods

### cancel[](#cancel)

- cancel(): void[](#cancel.cancel-1)
- #### Returns void

### get[](#get)

- get(url, requestOptions?): Promise<[AjaxResponse](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/interfaces/app.AjaxResponse.html)<any\>\>[](#get.get-1)
- Send a GET request.
    
    By default, it sends the request directly to the endpoint. When requestOptions.bypassCorsPolicy is set, the request will be forwarded to EPS. This can be used when a server has certain CORS policy. When EPS receives the forwarded request, it will validate the connector's permission settings defined in the connector.json.
    
    The function also validates the connector's permission settings on the client.
    
    #### Parameters
    
    - ##### url: string
    - ##### `Optional` requestOptions: [ConnectorRequestOptions](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/interfaces/app.ConnectorRequestOptions.html)
    
    #### Returns Promise<[AjaxResponse](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/interfaces/app.AjaxResponse.html)<any\>\>

### post[](#post)

- post(url, body?, requestOptions?): Promise<[AjaxResponse](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/interfaces/app.AjaxResponse.html)<any\>\>[](#post.post-1)
- Send a POST request.
    
    By default, it sends the request directly to the endpoint. When requestOptions.bypassCorsPolicy is set, the request will be forwarded to EPS. This can be used when a server has certain CORS policy. When EPS receives the forwarded request, it will validate the connector's permission settings defined in the connector.json.
    
    The function also validates the connector's permission settings on the client.
    
    #### Parameters
    
    - ##### url: string
    - ##### `Optional` body: object
    - ##### `Optional` requestOptions: [ConnectorRequestOptions](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/interfaces/app.ConnectorRequestOptions.html)
    
    #### Returns Promise<[AjaxResponse](https://help.tableau.com/v0.0/api/webdataconnector/en-us/reference/interfaces/app.AjaxResponse.html)<any\>\>

### submit[](#submit)

- submit(): Promise<void\>[](#submit.submit-1)
- #### Returns Promise<void\>

### Settings

#### Member Visibility

- Inherited

#### Theme

OSLightDark

### On This Page

- [constructor](#constructor)
- [appSnapshot](#appSnapshot)
- [handlerInputs](#handlerInputs)
- [secrets](#secrets)
- [oAuthCredentials](#oAuthCredentials)
- [cancel](#cancel)
- [get](#get)
- [post](#post)
- [submit](#submit)

Generated using [TypeDoc](https://typedoc.org/)