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

# Reader Login

> Two mutually exclusive request shapes on the same endpoint, selected by presence of `client`:
- **Email/password** (omit `client`): `email`, `password`, optional `g-recaptcha-response` (required if `login_captcha.secret_key` is configured for the publisher).
- **OAuth** (include `client: "google"|"facebook"`): `email` plus provider-specific fields forwarded raw to the backend as JSON. `password` is not accepted in this flow.

<Info>Use `Content-Type: application/json` for OAuth logins. For email/password, both `application/json` and form encoding are accepted.</Info>



## OpenAPI

````yaml /openapi/content-management.json post /publisher/{publisher_id}/reader/login/
openapi: 3.1.0
info:
  title: Publive Content Management API
  version: 1.0.0
  description: >-
    Read/write API for managing publisher content: categories, tags, posts, live
    blogs, media, custom content types, custom components, forms, reader
    accounts, and newsletter subscriptions.
servers:
  - url: https://cms.thepublive.com
security:
  - basicAuth: []
tags:
  - name: Categories
  - name: Tags
  - name: Posts
  - name: Live Blogs
  - name: Media Library
  - name: Custom Content Types
  - name: Custom Components
  - name: Forms
  - name: Reader
  - name: Newsletter
paths:
  /publisher/{publisher_id}/reader/login/:
    post:
      tags:
        - Reader
      summary: Reader Login
      description: >-
        Two mutually exclusive request shapes on the same endpoint, selected by
        presence of `client`:

        - **Email/password** (omit `client`): `email`, `password`, optional
        `g-recaptcha-response` (required if `login_captcha.secret_key` is
        configured for the publisher).

        - **OAuth** (include `client: "google"|"facebook"`): `email` plus
        provider-specific fields forwarded raw to the backend as JSON.
        `password` is not accepted in this flow.


        <Info>Use `Content-Type: application/json` for OAuth logins. For
        email/password, both `application/json` and form encoding are
        accepted.</Info>
      operationId: readerLogin
      parameters:
        - $ref: '#/components/parameters/PublisherId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  title: Email/password login
                  properties:
                    email:
                      type: string
                    password:
                      type: string
                    g-recaptcha-response:
                      type: string
                  required:
                    - email
                    - password
                - type: object
                  title: OAuth login
                  properties:
                    client:
                      type: string
                      enum:
                        - google
                        - facebook
                    email:
                      type: string
                    sub:
                      type: string
                    name:
                      type: string
                    given_name:
                      type: string
                    family_name:
                      type: string
                    picture: {}
                    email_verified:
                      type: boolean
                    hd:
                      type: string
                    id:
                      type: string
                    first_name:
                      type: string
                    last_name:
                      type: string
                  required:
                    - client
                    - email
      responses:
        '200':
          description: Login success
          content:
            application/json:
              example:
                status: ok
                message: Login successful
                token: abc123def456
                user_id: 1
                email: reader@example.com
        '400':
          description: Wrong password, no account, or captcha failed
        '403':
          description: Unverified email
      security: []
components:
  parameters:
    PublisherId:
      name: publisher_id
      in: path
      required: true
      schema:
        type: string
      description: Your Publisher ID
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Auth using your Publive API key pair, base64-encoded.

````