---
title: "AuthenticateRequestPayload"
url: "https://nov18-dev.movespot.fyi/apis/konnect-kong-identity-auth-api-dev-0/versions/95ca6cb9-c471-4475-a351-61326ecea57b/schemas/AuthenticateRequestPayload"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-kong-identity-auth-api-dev-0/versions/95ca6cb9-c471-4475-a351-61326ecea57b.md

# AuthenticateRequestPayload

The credential payload used to authenticate a request against the directory. Use API key authentication to authenticate with an API key, or basic auth to authenticate with a username and password.

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Kong Identity auth api
  version: 0.0.2
servers:
  - url: https://us.api.konghq.com
    description: United-States Production region
  - url: https://eu.api.konghq.com
    description: Europe Production region
  - url: https://au.api.konghq.com
    description: Australia Production region
  - url: https://me.api.konghq.com
    description: Middle-East Production region
  - url: https://in.api.konghq.com
    description: India Production region
  - url: https://sg.api.konghq.com
    description: Singapore Production region
components:
  schemas:
    AuthenticateRequestPayloadKeyAuth:
      description: |
        Authenticates a request using an API key credential.
      type: object
      properties:
        api_key:
          description: the key to authenticate the principal with.
          type: string
          minLength: 1
        auth_type:
          type: string
          enum:
            - key_auth
        include_consumer:
          description: >
            When true, the Kong consumer identity mapped to the resolved
            principal is included in the response.
          type: boolean
        workspace_id:
          description: >
            Scopes the consumer lookup to a specific workspace within the
            control plane. Applicable only when include_consumer is true.
          type: string
      required:
        - api_key
        - auth_type
    AuthenticateRequestPayloadBasicAuth:
      description: |
        Authenticates a request using a username and password credential.
      type: object
      properties:
        username:
          description: The username of the principal to authenticate.
          type: string
          minLength: 1
        password:
          description: The password associated with the username.
          type: string
          minLength: 1
        auth_type:
          type: string
          enum:
            - basic_auth
        include_consumer:
          description: >
            When true, the Kong consumer identity mapped to the resolved
            principal is included in the response.
          type: boolean
        workspace_id:
          description: >
            Scopes the consumer lookup to a specific workspace within the
            control plane. Applicable only when include_consumer is true.
          type: string
      required:
        - username
        - password
        - auth_type
    AuthenticateRequestPayload:
      description: >
        The credential payload used to authenticate a request against the
        directory.

        Use API key authentication to authenticate with an API key, or basic
        auth to authenticate with a username and password.
      type: object
      discriminator:
        propertyName: auth_type
        mapping:
          key_auth: "#/components/schemas/AuthenticateRequestPayloadKeyAuth"
          basic_auth: "#/components/schemas/AuthenticateRequestPayloadBasicAuth"
      oneOf:
        - $ref: "#/components/schemas/AuthenticateRequestPayloadKeyAuth"
        - $ref: "#/components/schemas/AuthenticateRequestPayloadBasicAuth"
```
