{"id":21848970,"url":"https://github.com/alejandromume/node-fusionapi","last_synced_at":"2026-04-16T12:32:29.529Z","repository":{"id":57243326,"uuid":"370136785","full_name":"alejandromume/node-fusionapi","owner":"alejandromume","description":"The original FusionAPI C# package brought to JavaScript","archived":false,"fork":false,"pushed_at":"2021-05-24T17:54:16.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T08:01:31.456Z","etag":null,"topics":["api","authentication","fusionapi","javascript-library","nodejs","npm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alejandromume.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-23T19:10:19.000Z","updated_at":"2024-05-21T16:21:19.000Z","dependencies_parsed_at":"2022-09-15T00:50:42.966Z","dependency_job_id":null,"html_url":"https://github.com/alejandromume/node-fusionapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandromume%2Fnode-fusionapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandromume%2Fnode-fusionapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandromume%2Fnode-fusionapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandromume%2Fnode-fusionapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alejandromume","download_url":"https://codeload.github.com/alejandromume/node-fusionapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244842449,"owners_count":20519615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","authentication","fusionapi","javascript-library","nodejs","npm"],"created_at":"2024-11-28T00:09:48.659Z","updated_at":"2026-04-16T12:32:29.478Z","avatar_url":"https://github.com/alejandromume.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FusionAPI for NodeJS\r\n\r\n## \u003cins\u003eIntroduction \r\n* This is the original FusionAPI `C#` package brought to `JavaScript`.\r\n* Website: https://fusionapi.dev/\r\n* Official repo: https://github.com/FusionAPI/FusionAPI-CSharp\r\n\r\n## \u003cins\u003eIssues\r\n* Chat module is not available right now. I will update it soon\r\n\r\n## \u003cins\u003eInstall\r\n* To install FusionAPI `npm` package you just need to run the following command in your terminal:\r\n```\r\nnpm i fusionapi\r\n```\r\n\r\n## \u003cins\u003eModules\r\n* Here is a list of all the modules and code examples:\r\n---\r\n\r\n* `App.ValidateSession()` -\u003e Check if a session is active.\r\n* `App.Has2FA(username)` -\u003e Checks if a user has 2FA enabled.\r\n* `App.GetAppVars()` -\u003e Fetches application variables.\r\n* `App.SetUserVars(key, value)` -\u003e Set user variables.\r\n* `App.GetIP()` -\u003e Get visitor IP\r\n* `App.Login(username, password)` -\u003e Login\r\n* `App.Register(username, password, token)` -\u003e Register users to your application.\r\n* `App.ResetPassword(oldpassword, newpassword)` -\u003e Reset your password\r\n* `App.MyBlob()` -\u003e Returns a blob of user data.\r\n* `App.AppBlob()` -\u003e Fetch all relevant data on an app.\r\n* `App.MyVars()` -\u003e Grabs user variables.\r\n---\r\n## Examples\r\n\r\n### Login\r\n```js\r\nconst { FusionApp } = require(\"fusionapi\")\r\nvar  App = new  FusionApp(\"APPID\")\r\n\r\nApp.Login(\"username\", \"Password123/\").then(loginResponse =\u003e {\r\n\tif(loginResponse.error == false){\r\n\t\tconsole.log(loginResponse.message);\r\n\t}else{\r\n\t\tconsole.log(loginResponse.message);\r\n\t}\r\n})\r\n```\r\n\r\n### Register\r\n```js\r\nconst { FusionApp } = require(\"fusionapi\")\r\nvar  App = new  FusionApp(\"APPID\")\r\n\r\nApp.Register(\"username\", \"Password123/\", \"TOKEN\").then(registerResponse =\u003e {\r\n\tif(registerResponse.error == false){\r\n\t\tconsole.log(registerResponse.message);\r\n\t}else{\r\n\t\tconsole.log(registerResponse.message);\r\n\t}\r\n})\r\n```\r\n\r\n### Reset Password\r\n```js\r\nApp.Login(\"username\", \"Password123/\").then(data =\u003e {\r\n    if(loginResponse.error == false){\r\n        \r\n        App.ResetPassword(\"myOldPassword\", \"myNewPassword\").then(resetResponse =\u003e {\r\n            if(resetResponse.error == false){\r\n                console.log(resetResponse.vars);\r\n            }else{\r\n                console.log(resetResponse.message);\r\n            }\r\n        })\r\n\r\n    }else{\r\n        console.log(loginResponse.message);\r\n    }\r\n})\r\n```\r\n\t\r\n### Check 2FA\r\n```js\r\nconst { FusionApp } = require(\"fusionapi\")\r\nvar  App = new  FusionApp(\"APPID\")\r\n\r\nApp.Has2FA(\"username\").then(h2faResponse =\u003e {\r\n\tif(h2faResponse.error == false){\r\n\t\tconsole.log(h2faResponse.status);\r\n\t}else{\r\n\t\tconsole.log(h2faResponse.message);\r\n\t}\r\n})\r\n```\r\n\r\n### Get App Vars\r\n```js\r\nconst { FusionApp } = require(\"fusionapi\")\r\nvar  App = new  FusionApp(\"APPID\")\r\n\r\nApp.Login(\"username\", \"Password123/\").then(loginResponse =\u003e {\r\n\tif(loginResponse.error == false){\r\n\t\r\n\t\tApp.GetAppVars().then(appVars =\u003e {\r\n\t\t\tif(appVars.error == false){\r\n\t\t\t\tconsole.log(appVars.vars);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.log(appVars.message);\r\n\t\t\t}\r\n\t\t})\r\n\t\t\r\n\t}else{\r\n\t\tconsole.log(loginResponse.message);\r\n\t}\r\n\r\n})\r\n```\r\n\r\n### Set User Vars\r\n```js\r\nconst { FusionApp } = require(\"fusionapi\")\r\nvar  App = new  FusionApp(\"APPID\")\r\n\r\nApp.Login(\"username\", \"Password123/\").then(loginResponse =\u003e {\r\n\tif(loginResponse.error == false){\r\n\r\n        App.SetUserVars(\"varName\", \"varValue\").then(userVarResponse =\u003e {\r\n            console.log(userVarResponse);\r\n        })\r\n    \r\n\t}else{\r\n\t\tconsole.log(loginResponse.message);\r\n\t}\r\n\r\n})\r\n```\r\n\t\r\n### Get User Vars\r\n```js\r\nconst { FusionApp } = require(\"fusionapi\")\r\nvar  App = new  FusionApp(\"APPID\")\r\n\r\nApp.Login(\"username\", \"Password123/\").then(loginResponse =\u003e {\r\n\tif(loginResponse.error == false){\r\n\r\n        App.MyVars(\"varName\", \"varValue\").then(userVarResponse =\u003e {\r\n            console.log(userVarResponse);\r\n        })\r\n    \r\n\t}else{\r\n\t\tconsole.log(loginResponse.message);\r\n\t}\r\n\r\n})\r\n```\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandromume%2Fnode-fusionapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejandromume%2Fnode-fusionapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandromume%2Fnode-fusionapi/lists"}