> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentscope.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List all credentials

> Return all credential records belonging to the authenticated user.

Args:
    user_id (`str`):
        Injected authenticated user ID.
    storage (`StorageBase`):
        Injected storage backend.

Returns:
    `ListCredentialsResponse`:
        All credential records and their total count.



## OpenAPI

````yaml /versions/2.0.2/en/deploy/openapi.json get /credential/
openapi: 3.1.0
info:
  title: AgentScope
  version: 2.0.1
servers: []
security: []
paths:
  /credential/:
    get:
      tags:
        - credential
      summary: List all credentials
      description: |-
        Return all credential records belonging to the authenticated user.

        Args:
            user_id (`str`):
                Injected authenticated user ID.
            storage (`StorageBase`):
                Injected storage backend.

        Returns:
            `ListCredentialsResponse`:
                All credential records and their total count.
      operationId: list_credentials_credential__get
      parameters:
        - name: x-user-id
          in: header
          required: true
          schema:
            type: string
            description: >-
              Caller's user ID. Temporary header-based identity; will be
              replaced by JWT auth.
            title: X-User-Id
          description: >-
            Caller's user ID. Temporary header-based identity; will be replaced
            by JWT auth.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCredentialsResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListCredentialsResponse:
      properties:
        credentials:
          items:
            $ref: '#/components/schemas/CredentialRecord'
          type: array
          title: Credentials
          description: Credential records.
        total:
          type: integer
          title: Total
          description: Total number of credentials.
      type: object
      required:
        - credentials
        - total
      title: ListCredentialsResponse
      description: Response body for listing credentials.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CredentialRecord:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the credential.
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_at:
          type: string
          format: date-time
          title: Created At
        user_id:
          type: string
          title: User Id
        data:
          additionalProperties: true
          type: object
          title: Data
      type: object
      required:
        - data
      title: CredentialRecord
      description: The credential model used for storing credentials.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````