---
title: "Generate an impersonation refresh token for a user by authId and appId"
method: POST
path: "/api/v1/users/{authId}/impersonation/{appId}"
tags: ["Users"]
---

# Generate an impersonation refresh token for a user by authId and appId

`POST /api/v1/users/{authId}/impersonation/{appId}`

Required scope - root

## Path parameters

- `authId` string, required
- `appId` number, required

## Request body

- object
  - `impersonatorToken` string — The access token of the user impersonating, this user must be a super_admin

## Response `200`

A refresh token for impersonation

- object
  - `refresh_token` string — The refresh token for impersonation
  - `refresh_token_expires_on` number — The expiration time of the refresh token
  - `refresh_token_expires_in` number — The remaining time of the refresh token in seconds

---

[API](https://skmtc.net/valuemelody/apis/melody-auth-s2s-api.md) · [All operations](https://skmtc.net/valuemelody/apis/melody-auth-s2s-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/valuemelody/melody-auth-s2s-api/revisions/2e1471620fd7/schema)
