# /impersonate/status - Check current impersonation status **GET /impersonate/status** Checks if the current user has an active impersonation session. **Works with both token types:** - **Impersonation token**: Returns session details from the token - **Regular token**: Checks Redis for active session and returns a new impersonation token if found **Use case for regular token:** After a page refresh, the frontend loses the impersonation token but calls `/auth/exchange` to get a regular token. This endpoint allows the frontend to check if there's an active impersonation session and receive a new impersonation token to continue the session. **Response when impersonating:** - `is_impersonating`: true - `token`: New impersonation JWT token (with remaining duration) - `expires_in`: Remaining seconds until expiration - `session_id`: Session ID for audit tracking - `impersonated_user`: Details of the user being impersonated - `impersonator`: Details of the user doing the impersonation - `expires_at`: Session expiration timestamp - `created_at`: Session creation timestamp **Response when not impersonating:** - `is_impersonating`: false ## Servers - Backend API server (port 8080): https://api.your-domain.com/api (Backend API server (port 8080)) - Collect API server (port 8081): https://collect.your-domain.com/api (Collect API server (port 8081)) ## Authentication methods - Bearer auth ## Parameters ## Responses ### 200: Status retrieved successfully #### Body Parameters: application/json (object) - **code** (integer) - **message** (string) - **data** (object) ### 401: Unauthorized - invalid or missing token #### Body Parameters: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) ### 500: Internal server error (failed to check session or generate token) #### Body Parameters: application/json (object) - **code** (integer) HTTP error code - **message** (string) Error message - **data** (object) [Powered by Bump.sh](https://bump.sh)