---
title: "Create a Logout URL for Browsers"
method: GET
path: "/self-service/logout/browser"
tags: ["frontend"]
---

# Create a Logout URL for Browsers

`GET /self-service/logout/browser`

This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user.

This endpoint is NOT INTENDED for API clients and only works
with browsers (Chrome, Firefox, ...). For API clients you can
call the `/self-service/logout/api` URL directly with the Ory Session Token.

The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns
a 401 error.

When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.

## Query parameters

- `return_to` string

## Headers

- `cookie` string

## Response `200`

logoutFlow

- LogoutFlow — Logout Flow
  - `logout_token` string, required — LogoutToken can be used to perform logout using AJAX.
  - `logout_url` string, required — LogoutURL can be opened in a browser to sign the user out. format: uri

## Other responses

- `400` — errorGeneric
- `401` — errorGeneric
- `500` — errorGeneric

---

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