Plug Database icon

Plug Database

Run Plug Database commands over REST or Socket.

Client Access → Set Client Token

AI-generated

Summary

Set or clear the client bearer token associated with a specific Plug agent identifier to manage client authentication credentials.

Inputs

  • Agent ID (required) — The Plug agent identifier for which the client token is being set or cleared.
  • Client Token (required) — The bearer token string to store for the specified client and agent pair; only used if clearing the stored token is disabled.
  • Clear Stored Client Token — If true, clears the stored client token instead of replacing it with a new token.
  • Include Plug Metadata — Whether to include the __plug metadata object containing operation and pagination information in the output.

Output shape

a list of updated client token items reflecting the set or cleared token status for the specified agent, with optional __plug metadata.

If 'Clear Stored Client Token' is true, the stored token is cleared and returned in the response; otherwise, the token is replaced with the provided value. The metadata inclusion is controlled by 'Include Plug Metadata'. The output format includes per-item and operation metadata when enabled.

Examples

Example 1: Set a client bearer token for agent 'agent-123'

Provide 'Agent ID' as 'agent-123', 'Client Token' as the new bearer token string, and set 'Clear Stored Client Token' to false or leave default. The node stores this token for subsequent authenticated client actions.

Example 2: Clear the stored client bearer token for agent 'agent-123'

Provide 'Agent ID' as 'agent-123', set 'Clear Stored Client Token' to true to remove the saved token for the agent. The 'Client Token' value is ignored in this case.

Links

Discussion