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

# ListApiKeys

> ListApiKeys retrieves all API keys belonging to the authenticated developer.
 Key secrets are never returned — only the key_prefix is shown for identification.



## OpenAPI

````yaml /api/anghami-sdk.openapi.yaml get /v1/developer/keys
openapi: 3.1.0
info:
  title: Anghami + OSN+ SDK
  description: >-
    Unified OpenAPI bundle covering all Anghami + OSN+ SDK services (music +
    video streaming).
  contact:
    name: Anghami Developer Platform
    email: developers@anghami.com
  version: 1.0.0
servers:
  - url: https://sdk.anghami.com
security: []
paths:
  /v1/developer/keys:
    get:
      tags:
        - DeveloperService
      summary: ListApiKeys
      description: >-
        ListApiKeys retrieves all API keys belonging to the authenticated
        developer.
         Key secrets are never returned — only the key_prefix is shown for identification.
      operationId: ListApiKeys
      parameters:
        - name: Authorization
          in: header
          description: >-
            OAuth 2.0 Bearer token. Required for all key management operations.
            Format: Bearer <access_token>.
          required: true
          schema:
            type: string
            example: Bearer eyJhbGciOiJSUzI1NiIs...
        - name: page_size
          in: query
          description: Maximum number of keys to return per page (1-100, default 20).
          required: false
          schema:
            type: integer
            format: int32
        - name: page_token
          in: query
          description: Opaque page token from a previous response. Omit for the first page.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sdk_developer_v1_ListApiKeysResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    sdk_developer_v1_ListApiKeysResponse:
      type: object
      properties:
        apiKeys:
          type: array
          items:
            $ref: '#/components/schemas/sdk_developer_v1_ApiKey'
        nextPageToken:
          type: string
          description: Token for the next page of results. Empty if no more pages.
      description: >-
        ListApiKeysResponse is the response message containing the developer's
        API keys.
    ValidationError:
      type: object
      properties:
        violations:
          type: array
          items:
            $ref: '#/components/schemas/FieldViolation'
          description: List of validation violations
      required:
        - violations
      description: >-
        ValidationError is returned when request validation fails. It contains a
        list of field violations describing what went wrong.
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message (e.g., 'user not found', 'database connection failed')
      description: >-
        Error is returned when a handler encounters an error. It contains a
        simple error message that the developer can customize.
    sdk_developer_v1_ApiKey:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the API key.
        name:
          type: string
          description: >-
            Developer-assigned label for identification (e.g. "Production",
            "Staging").
        keyPrefix:
          type: string
          description: |-
            Visible prefix for identification (e.g. "ang_live_abc").
             The full key is never returned after initial creation.
        status:
          type: string
          enum:
            - API_KEY_STATUS_UNSPECIFIED
            - API_KEY_STATUS_ACTIVE
            - API_KEY_STATUS_REVOKED
          description: ApiKeyStatus represents the lifecycle state of an API key.
        scopes:
          type: array
          items:
            type: string
            description: >-
              Granted permission scopes for this key. Valid values: "read",
              "stream".
        createdAt:
          type: string
          description: ISO 8601 timestamp of when the key was created.
        lastUsedAt:
          type: string
          description: |-
            ISO 8601 timestamp of when the key was last used for authentication.
             Empty if the key has never been used.
        expiresAt:
          type: string
          description: |-
            ISO 8601 timestamp of when the key expires.
             Empty if the key does not expire.
      description: >-
        ApiKey represents a developer API key used for server-to-server
        authentication.
         API keys are passed in the x-api-key HTTP header and are billed per key.
         The full secret is only returned on creation and rotation.
    FieldViolation:
      type: object
      properties:
        field:
          type: string
          description: >-
            The field path that failed validation (e.g., 'user.email' for nested
            fields). For header validation, this will be the header name (e.g.,
            'X-API-Key')
        description:
          type: string
          description: >-
            Human-readable description of the validation violation (e.g., 'must
            be a valid email address', 'required field missing')
      required:
        - field
        - description
      description: FieldViolation describes a single validation error for a specific field.

````