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

# Access token Spotify para o Web Playback SDK no navegador

> Devolve um access_token válido para o SDK oficial da Spotify. Renova automaticamente quando próximo do expiry. Requer uma integração Spotify configurada para o escopo atual.



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi get /v1/spotify/web-playback-token
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/spotify/web-playback-token:
    get:
      tags:
        - Spotify
      summary: Access token Spotify para o Web Playback SDK no navegador
      description: >-
        Devolve um access_token válido para o SDK oficial da Spotify. Renova
        automaticamente quando próximo do expiry. Requer uma integração Spotify
        configurada para o escopo atual.
      operationId: getV1SpotifyWeb-playback-token
      parameters: []
      responses:
        '200':
          description: Token válido
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                  expires_in:
                    type: integer
                    description: Segundos até o token expirar
                  expires_at:
                    type: string
                    description: ISO timestamp absoluto do expiry
                required:
                  - access_token
                  - expires_in
                  - expires_at
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: unauthorized
        '404':
          description: Integração Spotify não configurada para este escopo
          content:
            application/json:
              schema:
                type: object
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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