PgBeam Docs
Agents

getAgentCredential

Get an agent credential

Returns a single agent credential. Secrets are never included.

Usage

const result = await api.agents.getAgentCredential({
  pathParams: { project_id: "prj_xxx", agent_id: "agt_xxx" },
});

Parameters

ParameterTypeRequiredDescription
pathParams.project_idstringYesUnique project identifier (prefixed, e.g. prj_xxx).
pathParams.agent_idstringYesUnique agent credential identifier (prefixed, e.g. agt_xxx).

Response

Promise<AgentCredential> — the agent credential (no secrets).

Example

import { PgBeamClient } from "pgbeam";

const client = new PgBeamClient({
  token: "pbk_...",
  baseUrl: "https://api.pgbeam.com",
});

const result = await client.api.agents.getAgentCredential({
  pathParams: { project_id: "prj_xxx", agent_id: "agt_xxx" },
});

Errors

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
404Resource not found.

On this page