Okay, here’s my problem… I’m trying to create an npm package so people can create their own discord → roblox or website → roblox ranking bots. I’m trying to make it easier to use than noblox.js or any other nodejs package, and with better documentation. I’m having trouble making the authentication or login function, I’m getting errors such as “Token Validation Failed”, here is my code:
> const http = require("http");
> const request = require("request");
> const Promise = require("promise");
> const cookie = require("cookie");
>
> module.exports.login = async function(cookie) {
>
> request.post("https://auth.roblox.com/v2/logout", {}, function(error, response, body) {
> console.log(body);
> });
>
> var options = {
> method: 'POST',
> url: "https://auth.roblox.com/",
> headers: {
> "Content-Type": "application/json",
> "Cookie": cookie
> }
> }
>
> request(options, function(error, response, body){
> console.log(body);
> });
>
> }
>
> module.exports.getAudit = async function(groupid) {
> return new Promise(function(resolve, reject) {
> request("https://groups.roblox.com/v1/groups/"+groupid+"/audit-log", function(error, response, body){
> if(error){
> reject(error);
> }
> var parsedBody = JSON.parse(body);
> resolve(parsedBody);
> });
> });
> }
>
> module.exports.checkLogin = function() {
> request("https://auth.roblox.com/", function(error, response, unparsedBody) {
> var body = JSON.parse(unparsedBody)
> console.log(body.message);
> });
> }
>
> module.exports.getGroupInfo = async function(groupid) {
> return new Promise(function(resolve, reject){
> request("http://api.roblox.com/groups/"+groupid+"/", function(error, response, body) {
> if(error){
> reject(error);
> }
> var parsedBody = JSON.parse(body);
> resolve(parsedBody);
> });
> });
> }