- [HTTP request](https://docs.cloud.google.com/backup-disaster-recovery/docs/reference/rest/v1beta/projects.locations.backupVaults.dataSources/fetchAccessToken#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/backup-disaster-recovery/docs/reference/rest/v1beta/projects.locations.backupVaults.dataSources/fetchAccessToken#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/backup-disaster-recovery/docs/reference/rest/v1beta/projects.locations.backupVaults.dataSources/fetchAccessToken#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/backup-disaster-recovery/docs/reference/rest/v1beta/projects.locations.backupVaults.dataSources/fetchAccessToken#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/backup-disaster-recovery/docs/reference/rest/v1beta/projects.locations.backupVaults.dataSources/fetchAccessToken#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/backup-disaster-recovery/docs/reference/rest/v1beta/projects.locations.backupVaults.dataSources/fetchAccessToken#body.FetchAccessTokenResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/backup-disaster-recovery/docs/reference/rest/v1beta/projects.locations.backupVaults.dataSources/fetchAccessToken#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/backup-disaster-recovery/docs/reference/rest/v1beta/projects.locations.backupVaults.dataSources/fetchAccessToken#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/backup-disaster-recovery/docs/reference/rest/v1beta/projects.locations.backupVaults.dataSources/fetchAccessToken#try-it)

Internal only. Fetch access token for a given data source.

### HTTP request

Choose an endpoint:
global africa-south1 asia-east1 asia-east2 asia-northeast1 asia-northeast2 asia-northeast3 asia-south1 asia-south2 asia-southeast1 asia-southeast2 australia-southeast1 australia-southeast2 europe-central2 europe-north1 europe-north2 europe-southwest1 europe-west1 europe-west2 europe-west3 europe-west4 europe-west6 europe-west8 europe-west9 europe-west10 europe-west12 me-central1 me-central2 me-west1 northamerica-northeast1 northamerica-northeast2 northamerica-south1 southamerica-east1 southamerica-west1 us-central1 us-central2 us-east1 us-east4 us-east5 us-east7 us-south1 us-west1 us-west2 us-west3 us-west4 us-west8 us eu   
`POST https://backupdr.googleapis.com/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects/\*/locations/\*/backupVaults/\*/dataSources'. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "generationId": integer } ``` |

| Fields ||
|---|---|
| `generationId` | `integer` Required. The generation of the backup to update. |

### Response body

Response message for dataSources.fetchAccessToken.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "readLocation": string, "writeLocation": string, "token": string, "expireTime": string } ``` |

| Fields ||
|---|---|
| `readLocation` | `string` The location in bucket that can be used for reading. |
| `writeLocation` | `string` The location in bucket that can be used for writing. |
| `token` | `string` Input only. The downscoped token that was created. |
| `expireTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` The token is valid until this time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/cloud-backupdr`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `backupdr.bvdataSources.fetchAccessToken`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).