# Google Cloud Dialogflow Cx V3 Client - Class BearerTokenConfig (0.11.1)

0.11.1 (latest) 0.11.0 0.10.2 0.9.2 0.8.1 0.7.2 0.6.0 0.5.2 0.4.1 0.3.4 0.2.1 0.1.1 Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class BearerTokenConfig.

Config for authentication using bearer token.

Generated from protobuf message `google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig`

## Namespace

Google \\ Cloud \\ Dialogflow \\ Cx \\ V3 \\ Tool \\ Authentication

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ token` | `string` Optional. The text token appended to the text `Bearer` to the request Authorization header. [Session parameters reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) can be used to pass the token dynamically, e.g. `$session.params.parameter-id`. |
| `↳ secret_version_for_token` | `string` Optional. The name of the SecretManager secret version resource storing the Bearer token. If this field is set, the `token` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}` |

### getToken

Optional. The text token appended to the text `Bearer` to the request
Authorization header.

[Session parameters
reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
can be used to pass the token dynamically, e.g.
`$session.params.parameter-id`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setToken

Optional. The text token appended to the text `Bearer` to the request
Authorization header.

[Session parameters
reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
can be used to pass the token dynamically, e.g.
`$session.params.parameter-id`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSecretVersionForToken

Optional. The name of the SecretManager secret version resource storing
the Bearer token. If this field is set, the `token` field will be
ignored. Format:
`projects/{project}/secrets/{secret}/versions/{version}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSecretVersionForToken

Optional. The name of the SecretManager secret version resource storing
the Bearer token. If this field is set, the `token` field will be
ignored. Format:
`projects/{project}/secrets/{secret}/versions/{version}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |