For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
Usage
client.v2.functions.namespaces.byNamespace_id(namespace_id).keys.get(requestConfiguration?: RequestConfiguration<object>): Promise<undefined | KeysGetResponse>
Description
Lists all access keys for a serverless functions namespace.
To list access keys, send a GET request to /v2/functions/namespaces/{namespace_id}/keys.
Parameters
namespace_id string required
Example: fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The ID of the namespace to be managed.
Request Sample
Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
createDigitalOceanClient,
DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";
const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);
const response = await client.v2.functions.namespaces
.byNamespace_id("fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").keys.get();
Response Example
Show Response Example
{
"access_keys": [
{
"id": "dof_v1-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "my-function-access-key",
"expires_at": "2026-12-19T10:30:00Z",
"created_at": "2025-12-19T10:30:00Z",
"updated_at": "2025-12-19T10:30:00Z"
},
{
"id": "dof_v1-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "my-function-access-key-2",
"expires_at": null,
"created_at": "2025-11-15T08:00:00Z",
"updated_at": "2025-11-15T08:00:00Z"
}
],
"count": 2
}
See /v2/functions/namespaces/{namespace_id}/keys in the API reference for additional detail on responses, headers, parameters, and more.