Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!