/impersonate/consent - Get impersonation consent status

GET /impersonate/consent

Retrieves the current impersonation consent status for the authenticated user. Shows if consent is active, when it expires, and other consent details.

Responses

  • 200 application/json

    Consent status retrieved successfully

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object
      Hide data attribute Show data attribute object
  • 401 application/json

    Unauthorized - invalid or missing token

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
GET /impersonate/consent
curl \
 --request GET 'https://api.your-domain.com/api/impersonate/consent' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "code": 200,
  "message": "consent status retrieved successfully",
  "data": {
    "consent": {
      "id": "consent_123",
      "user_id": "usr_456",
      "expires_at": "2025-09-04T14:30:00Z",
      "max_duration_minutes": 60,
      "created_at": "2025-09-03T14:30:00Z"
    }
  }
}
Response examples (401)
{
  "code": 401,
  "message": "invalid token",
  "data": {}
}