Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

251
Vistas
Why can't I authorise api calls in FastApi swagger ui where the same apis can be authorised and invoked using postman?

I started programming in FastApi. It comes with a built-in swagger interface to interact with apis in my code. I had completed the authentication and authorisation for users in my database. But swagger is not authorising the users in my database where the same users got authorised using postman. The swagger ui authorisation form is displaying 'username' and 'password' and my table has 'phoneNumber' as unique field.

models.py

from sqlalchemy import Column, String, BigInteger, Integer from utils.database import Base

class UserModel(Base): tablename = "user"

id = Column(BigInteger, primary_key=True, index=True)
phoneNumber = Column(Integer, unique=True, index=True)
password = Column(String, index=True)
type = Column(String, index=True)
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda