Skip to content

unauthorized

HTTP 401 · code unauthorized

The request has no valid credentials.

Sent by your authentication middleware or handlers through photonerr.Unauthorized(msg). Photon itself never authenticates.

Send valid credentials (for example an Authorization header) and retry.

{
"type": "https://photon.agenticmarket.dev/errors/unauthorized",
"title": "unauthorized",
"status": 401,
"code": "unauthorized"
}

Match on the code field rather than on title, which is meant for people and may change. See all error codes.