Create a file `basic.py`: ```python hl_lines="16 19-21 25-30 36 41 47-48 50" {!../examples/basic.py!} ``` Run the server with: ```bash $ uvicorn basic:app --host 0.0.0.0 INFO: Started server process [9859] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) ``` To access a **jwt_required** protected url, all we have to do is send in the JWT with the request. By default, this is done with an authorization header that looks like: ``` Authorization: Bearer ``` We can see this in action using **curl**: ```bash $ curl http://localhost:8000/user {"detail":"Missing Authorization Header"} $ curl -H "Content-Type: application/json" -X POST \ -d '{"username":"test","password":"test"}' http://localhost:8000/login {"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0IiwiaWF0IjoxNjAzNjkyMjYxLCJuYmYiOjE2MDM2OTIyNjEsImp0aSI6IjZiMjZkZTkwLThhMDYtNDEzMy04MzZiLWI5ODJkZmI3ZjNmZSIsImV4cCI6MTYwMzY5MzE2MSwidHlwZSI6ImFjY2VzcyIsImZyZXNoIjpmYWxzZX0.ro5JMHEVuGOq2YsENkZigSpqMf5cmmgPP8odZfxrzJA"} $ export TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0IiwiaWF0IjoxNjAzNjkyMjYxLCJuYmYiOjE2MDM2OTIyNjEsImp0aSI6IjZiMjZkZTkwLThhMDYtNDEzMy04MzZiLWI5ODJkZmI3ZjNmZSIsImV4cCI6MTYwMzY5MzE2MSwidHlwZSI6ImFjY2VzcyIsImZyZXNoIjpmYWxzZX0.ro5JMHEVuGOq2YsENkZigSpqMf5cmmgPP8odZfxrzJA $ curl -H "Authorization: Bearer $TOKEN" http://localhost:8000/user {"user":"test"} ```