UNPKG

pterodactyl-api-wrapper

Version:

[![NPM version](https://img.shields.io/npm/v/pterodactyl-api-wrapper.svg)](https://npmjs.com/package/pterodactyl-api-wrapper) [![License](https://img.shields.io/npm/l/pterodactyl-api-wrapper.svg)](LICENSE)

31 lines (27 loc) 859 B
import ClientAPICall from "../../../../functions/createAppCall"; export interface Response { data: { image_url_data: string; }; } /** * Retrieves the Two-Factor Authentication (2FA) details for the authenticated user. * * @param {Object} options - API call options. * @param {string} options.apiKey - The API key for authentication. * @param {string} options.panel - The base URL of the Pterodactyl panel. * @returns {Promise<Response>} - API response containing 2FA details. * * @throws {Error} - Throws an error if the API request fails. */ export default async function twoFactorDetails(options: { apiKey: string; panel: string; }): Promise<Response> { return ClientAPICall({ apiKey: options.apiKey, panel: options.panel, method: "GET", endpoint: "account/two-factor" }); }