Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

alix1383/hiddify-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 8, 2023
7b929f9 Β· Sep 8, 2023

History

41 Commits
Jun 14, 2023
Sep 8, 2023
Sep 7, 2023
Sep 8, 2023
Jun 13, 2023
Jun 28, 2023
Jun 13, 2023
Sep 8, 2023

Repository files navigation

Hiddify-API

This is a third-party library For Hiddify


πŸ“‘ TODO :

  • API

    • Misc

      • Is Conected
      • Get System Stats
    • User

      • Get user list
      • Get User Info + Servers & Time Remain
      • Add User
      • Del User
      • Del deactive Usres
      • Get Telegram Proxy If available
    • Admin

      • Get Admin list
      • Add New Admin
      • Del admin
  • Support More Language

  • MISC

    • Write Doc
    • Error Handling

πŸ’‘ Usage Php :

<?php

include('php/api.php');

$api = new hiddifyApi(
    '', //! https://domain.com
    '', //! hiddify hidden path
    '' //! admin secret
);

$api->is_connected(); // return bool

$api->getSystemStats(); // return array


/////----------- USER API -----------\\\\\

$api->User->addUser(string $name,
                    int $package_days = 30,
                    int $package_size = 30,
                    ?string $telegram_id = null,
                    ?string $comment = null
                    string $resetMod = 'no_reset'); //! if success return user uuid else return false

$api->User->getUserList(); // return array

$api->User->getUserdetais(string $uuid); // return array

?>

πŸ’‘ Usage Node js :

Be sure to install axios,moment,dotenv modules before running !

import hiddifyApi from "node-js/api.js";

const api = new hiddifyApi(); // first edit your .env file

api.is_connected(); // return bool

api.getSystemStatus(); // return array

/////----------- USER API -----------\\\\\
const uuid = api.generateuuid();
api.addServise({ uuid, comment: "test", name: "hiddify api", day: 30, traficc: 25, telegram_id: 123456 }); //! if success return user uuid else return false

api.getUserList(); // return array

api.findServise(uuid); // return array  for find information uuid

🀝 Contributing :

Contributions to this project are always welcome! Feel free to submit a pull request or create an issue if you encounter any problems.

πŸ“ƒ License :

This project is licensed under the MIT License. See the LICENSE file for more information.