# Using the ORY Kratos Public API (:4433) without a session token
# returns an HTTP 403 error.
$ curl -s -X GET \
  -H "Accept: application/json"  \
  http://127.0.0.1:4433/self-service/settings/api | jq

{
  "error": {
    "code": 403,
    "status": "Forbidden",
    "reason": "This endpoint can only be accessed with a valid session. Please log in and try again.",
    "debug": "rid=\nerror=request does not have a valid authentication session\nreason=No active session was found in this request.\ndetails=map[]\ndebug=\n\ngithub.com/ory/kratos/session.(*ManagerHTTP).FetchFromRequest\n\t/go/src/github.com/ory/kratos/session/manager_http.go:119\ngithub.com/ory/kratos/session.(*Handler).IsAuthenticated.func1\n\t/go/src/github.com/ory/kratos/session/handler.go:163\ngithub.com/ory/kratos/x.NoCacheHandler.func1\n\t/go/src/github.com/ory/kratos/x/nocache.go:18\ngithub.com/julienschmidt/httprouter.(*Router).ServeHTTP\n\t/go/pkg/mod/github.com/julienschmidt/httprouter@v1.2.0/router.go:334\ngithub.com/ory/nosurf.(*CSRFHandler).handleSuccess\n\t/go/pkg/mod/github.com/ory/nosurf@v1.1.1/handler.go:187\ngithub.com/ory/nosurf.(*CSRFHandler).ServeHTTP\n\t/go/pkg/mod/github.com/ory/nosurf@v1.1.1/handler.go:144\ngithub.com/urfave/negroni.Wrap.func1\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:46\ngithub.com/urfave/negroni.HandlerFunc.ServeHTTP\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:29\ngithub.com/urfave/negroni.middleware.ServeHTTP\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:38\ngithub.com/urfave/negroni.(*Negroni).ServeHTTP\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:96\ngithub.com/gorilla/context.ClearHandler.func1\n\t/go/pkg/mod/github.com/gorilla/context@v1.1.1/context.go:141\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2042\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2843\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1925\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1374",
    "message": "The requested action was forbidden"
  }
}
