Ad Widget

Collapse

How get data after auth in swagger?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alexzi
    Junior Member
    • Aug 2022
    • 1

    #1

    How get data after auth in swagger?

    I getting json data from endpoint of my internal service like
    Code:
    http://127.0.0.1:8003/api/v1/check_status
    Code:
    {
    "total": 13,
    "daily": 10,
    "valid": 30.77,
    }
    But now I need to log in to receive data.
    Service on fastapi. Data gets from swagger.

    I understand that maybe I need send something like curl

    Code:
    curl -X 'GET' \
    'http://127.0.0.1:8003/api/v1/check_status' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer <authkey>'
    But I can't figure out how to set it up.
Working...