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

# Obter configuração pública Web Push

> Devolve as chaves públicas do Firebase necessárias para iniciar o SDK no navegador. Autentica pelo `client_id` público do OAuth Client no header `Authorization: Bearer <client_id>`. Nunca expõe a Service Account.



## OpenAPI

````yaml openapi.json GET /web-push-config
openapi: 3.1.0
info:
  title: OctaSend API
  description: >-
    API de mensageria multicanal — envie mensagens por E-mail, WhatsApp, SMS,
    Slack, Telegram, Web Push, In-App e Push mobile através de um único
    endpoint.
  version: 1.3.0
servers:
  - url: https://yghpblhxrfmxkwejvpjz.supabase.co/functions/v1
    description: Produção
security:
  - bearerAuth: []
tags:
  - name: Autenticação
  - name: Mensagens
  - name: Automações
  - name: Consultas
  - name: Widget In-App
  - name: Web Push
paths:
  /web-push-config:
    get:
      tags:
        - Web Push
      summary: Obter configuração pública Web Push
      description: >-
        Devolve as chaves públicas do Firebase necessárias para iniciar o SDK no
        navegador. Autentica pelo `client_id` público do OAuth Client no header
        `Authorization: Bearer <client_id>`. Nunca expõe a Service Account.
      operationId: getWebPushConfig
      responses:
        '200':
          description: Configuração pública do Firebase
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebPushConfigResponse'
        '401':
          description: Header ausente, `client_id` inexistente ou OAuth Client revogado
          content:
            application/json:
              examples:
                missing:
                  value:
                    error: Authorization header with Bearer <client_id> is required
                invalid:
                  value:
                    error: Invalid or inactive client_id
        '422':
          description: Canal Web Push não configurado ou inativo na conta
          content:
            application/json:
              example:
                error: Web push channel not configured for this tenant
        '500':
          description: Erro interno
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - publicClientId: []
components:
  schemas:
    WebPushConfigResponse:
      type: object
      properties:
        firebase_config:
          type: object
          properties:
            apiKey:
              type: string
            authDomain:
              type: string
            projectId:
              type: string
            messagingSenderId:
              type: string
            appId:
              type: string
        vapid_key:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Access token (`at_...`) obtido em `/oauth-token`, ou o par
        `client_id:client_secret` separado por dois-pontos, sem espaços.
    publicClientId:
      type: http
      scheme: bearer
      description: >-
        `client_id` público do OAuth Client (começa com `client_`). Usado por
        scripts que rodam no navegador; não autoriza envio nem leitura de
        histórico.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.