---
title: "Generate temporary path credentials."
method: POST
path: "/temporary-path-credentials"
tags: ["TemporaryCredentials"]
---

# Generate temporary path credentials.

`POST /temporary-path-credentials`

## Request

- Base URL: `http://localhost:8080/api/2.1/unity-catalog`
- URL: `http://localhost:8080/api/2.1/unity-catalog/temporary-path-credentials`
- Auth: none declared

## Request body

- GenerateTemporaryPathCredential
  - `url` string, required: The URL of the storage path for which temporary credentials need to be generated.
  - `operation` 'UNKNOWN_PATH_OPERATION' | 'PATH_READ' | 'PATH_READ_WRITE' | 'PATH_CREATE_TABLE', required

## Response `200`

Successful response

- TemporaryCredentials
  - `aws_temp_credentials` AwsCredentials
    - `access_key_id` string: The access key ID that identifies the temporary credentials.
    - `secret_access_key` string: The secret access key that can be used to sign AWS API requests.
    - `session_token` string: The token that users must pass to AWS API to use the temporary credentials.
  - `azure_user_delegation_sas` AzureUserDelegationSAS
    - `sas_token` string: Azure SAS Token
  - `gcp_oauth_token` GcpOauthToken
    - `oauth_token` string: Gcp Token
  - `expiration_time` integer: Server time when the credential will expire, in epoch milliseconds. The API client is advised to cache the credential given this expiration time.
  - `url` string: The normalized URL of the storage path the temporary credential was generated for.

## Changes

- **2026-07-22** `b851144f7f7e`: 1 info
  - added the optional property `url` to the response with the `200` status
- **2024-09-27** `da55daf791c3`: 1 breaking
  - removed the enum value `PATH_REFRESH` of the request property `operation`
- **2024-09-17** `00895ff43f02`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/unitycatalog/apis/unity-catalog-api/changes/temporary-path-credentials/post.md)

---

[API](https://skmtc.dev/unitycatalog/apis/unity-catalog-api.md) - [All operations](https://skmtc.dev/unitycatalog/apis/unity-catalog-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unitycatalog/apis/unity-catalog-api/revisions/c84507f0d7e0?raw)
