---
title: "Hasura auth hook endpoint"
method: GET
path: "/api/authn/hasura"
tags: ["Authn"]
---

# Hasura auth hook endpoint

`GET /api/authn/hasura`

The `HASURA_GRAPHQL_AUTH_HOOK` endpoint for Hasura auth. Use this endpoint to integrate Hasura's [webhook authentication flow](https://hasura.io/docs/latest/auth/authentication/webhook/).

## Query parameters

- `resource` string, required
- `unauthorizedRole` string

## Response `200`

The authenticated user claims in Hasura format. See [Hasura docs](https://hasura.io/docs/latest/auth/authentication/webhook/#webhook-response) for more information.

- object
  - `X-Hasura-User-Id` string
  - `X-Hasura-Role` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/versions/a163dc77d842/schema)
