---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/dataSources/{dataSourcesId}:fetchAccessToken"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/dataSources/{dataSourcesId}:fetchAccessToken"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/dataSources/{dataSourcesId}:fetchAccessToken

`POST /v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/dataSources/{dataSourcesId}:fetchAccessToken`

## Request

- Base URL: `https://backupdr.googleapis.com`
- URL: `https://backupdr.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/backupVaults/{backupVaultsId}/dataSources/{dataSourcesId}:fetchAccessToken`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-backupdr`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-backupdr`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

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

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `backupVaultsId` string, required
- `dataSourcesId` string, required

## Request body

- FetchAccessTokenRequest: Request message for FetchAccessToken.
  - `generationId` integer: Required. The generation of the backup to update.

## Response `200`

Successful response

- FetchAccessTokenResponse: Response message for FetchAccessToken.
  - `expireTime` string, google-datetime: The token is valid until this time.
  - `readLocation` string: The location in bucket that can be used for reading.
  - `token` string: Input only. The downscoped token that was created.
  - `writeLocation` string: The location in bucket that can be used for writing.

## Changes

- **2026-11-05** `da857420b4f6`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-backupdr` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-backupdr` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`
- **2026-10-29** `3244196e66b0`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-backupdr` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-backupdr` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/backupdr/changes/v1/projects/:projectsId/locations/:locationsId/backupVaults/:backupVaultsId/dataSources/:dataSourcesId:fetchAccessToken/post.md)

---

[API](https://skmtc.dev/google/apis/backupdr.md) - [All operations](https://skmtc.dev/google/apis/backupdr/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/backupdr/revisions/da857420b4f6?raw)
