---
title: "End impersonation session"
method: POST
path: "/auth/end-impersonate"
tags: ["Auth"]
---

# End impersonation session

`POST /auth/end-impersonate`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/auth/end-impersonate`
- Auth: HTTP bearer

End the current impersonation session and return to admin view

## Request body

- object
  - `refreshToken` string: The impersonation refresh token to revoke
  - `originalRefreshToken` string: The admin's own refresh token from before the impersonation. It is revoked, because new admin tokens are returned.

## Response `200`

Impersonation ended, admin tokens returned

## Other responses

- `400`: Not currently impersonating

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
