---
title: "Generate temporary credentials"
method: POST
path: "/organizations/{id}/credentials/{cred_id}/generate"
tags: ["Managed Credentials"]
---

# Generate temporary credentials

`POST /organizations/{id}/credentials/{cred_id}/generate`

Produces short-lived, scoped credentials from a stored credential.

## Path parameters

- `id` string, required
- `cred_id` string, required

## Request body

- GithubComActiveloopaiDeeplakeApiInternalCredentialsGenerateRequest
  - `expiration` integer — seconds, default 3600
  - `mode` string — "read", "write", "readwrite"
  - `path` string

## Response `200`

OK

- GithubComActiveloopaiDeeplakeApiInternalCredentialsGeneratedCredentials
  - `creds` object
  - `expiration` number

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/deeplake/apis/deeplake-api.md) · [All operations](https://skmtc.net/deeplake/apis/deeplake-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeplake/deeplake-api/revisions/e16ed11d991c/schema)
