--- title: Generate Dataset Credentials description: Generate temporary S3 credentials to directly access and download dataset files from cloud storage. Credentials are valid for 7 days by default and provide read-only access to your team's available datasets. url: https://theirstack.com/en/docs/api-reference/datasets/post_datasets_credentials_v1 --- ## POST /v1/datasets/credentials — Generate Dataset Credentials Generate temporary S3 credentials to directly access and download dataset files from cloud storage. Credentials are valid for 7 days by default and provide read-only access to your team's available datasets. ### Responses #### 200 — Successful Response | Field | Type | Required | Description | | --- | --- | --- | --- | | `access_key_id` | string | Yes | The access key id for the temporary credential | | `expiration` | string | Yes | The expiration date of the temporary credential | | `secret_access_key` | string | Yes | The secret access key for the temporary credential | | `session_token` | string | Yes | The session token for the temporary credential | | `storage` | StorageConfig | Yes | Storage configuration including bucket name and endpoint URL | ##### `storage` | Field | Type | Required | Description | | --- | --- | --- | --- | | `bucket_name` | string | Yes | The S3/R2 bucket name where the datasets are stored | | `endpoint_url` | string | Yes | The S3-compatible endpoint URL to use for accessing the bucket | | `prefixes` | array | Yes | The prefixes to use for the temporary credential | #### 400 — Bad Request | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | Error | Yes | | | `request_id` | integer | No | The request id. This is useful to contact us to help you debug the issue. The request\_id won't be present in all errors. | ##### `error` | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | No | The error code. Eg: \`E-001\`, \`E-002\`, \`E-003\`, \`E-004\`, \`E-005\`, \`E-006\`, \`E-007\`, \`E-008\`, \`E-009\`, \`E-010\`, \`E-011\`, \`E-012\`, \`E-013\`, \`E-014\`, \`E-015\`, \`E-016\` | | `description` | string | No | The error description | | `title` | string | Yes | The error title. | #### 402 — Payment Required | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | Error | Yes | | | `request_id` | integer | No | The request id. This is useful to contact us to help you debug the issue. The request\_id won't be present in all errors. | ##### `error` | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | No | The error code. Eg: \`E-001\`, \`E-002\`, \`E-003\`, \`E-004\`, \`E-005\`, \`E-006\`, \`E-007\`, \`E-008\`, \`E-009\`, \`E-010\`, \`E-011\`, \`E-012\`, \`E-013\`, \`E-014\`, \`E-015\`, \`E-016\` | | `description` | string | No | The error description | | `title` | string | Yes | The error title. | #### 422 — Unprocessable Entity | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | Error | Yes | | | `request_id` | integer | No | The request id. This is useful to contact us to help you debug the issue. The request\_id won't be present in all errors. | ##### `error` | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | No | The error code. Eg: \`E-001\`, \`E-002\`, \`E-003\`, \`E-004\`, \`E-005\`, \`E-006\`, \`E-007\`, \`E-008\`, \`E-009\`, \`E-010\`, \`E-011\`, \`E-012\`, \`E-013\`, \`E-014\`, \`E-015\`, \`E-016\` | | `description` | string | No | The error description | | `title` | string | Yes | The error title. | #### 500 — Internal Server Error | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | Error | Yes | | | `request_id` | integer | No | The request id. This is useful to contact us to help you debug the issue. The request\_id won't be present in all errors. | ##### `error` | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | No | The error code. Eg: \`E-001\`, \`E-002\`, \`E-003\`, \`E-004\`, \`E-005\`, \`E-006\`, \`E-007\`, \`E-008\`, \`E-009\`, \`E-010\`, \`E-011\`, \`E-012\`, \`E-013\`, \`E-014\`, \`E-015\`, \`E-016\` | | `description` | string | No | The error description | | `title` | string | Yes | The error title. |