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

# Authorize channel subscription

> Channel authorization — point your Pusher client's channel auth here with
your server key as the Authorization header. A new consumerId takes over
from the previous consumer (its connection is terminated).



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /s2s/stream/auth
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /s2s/stream/auth:
    post:
      tags:
        - S2S Stream
      summary: Authorize channel subscription
      description: >-
        Channel authorization — point your Pusher client's channel auth here
        with

        your server key as the Authorization header. A new consumerId takes over

        from the previous consumer (its connection is terminated).
      operationId: Auth
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/S2SStreamAuthBody'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
      security:
        - s2s: []
components:
  schemas:
    S2SStreamAuthBody:
      properties:
        socket_id:
          type: string
        channel_name:
          type: string
        consumerId:
          type: string
          description: >-
            Identifies the connecting backend instance; a new consumerId takes
            over.
        typingEvents:
          type: boolean
          description: >-
            Opt this stream into agent.typing.* events (high volume; default
            off).
      required:
        - socket_id
        - channel_name
        - consumerId
      type: object
      additionalProperties: false
  securitySchemes:
    s2s:
      type: http
      scheme: bearer
      bearerFormat: Service account token (JWT)

````