1.1.7 • Published 3 years ago

xbox-live-system v1.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Install

npm i xbox-live-system

Getting started

First, have your account token, if you don't have a token, try it to get your token:

const xls = require("xbox-live-system");

//This method is based on Async/await.
const token = await xls.Token("<your email>", "<your password>");
//output: ["token", "uhs"]

Note: The account cannot have 2-step verification. Preferably, use only an account that has only a password as security.

Attention: the token, email and password must be kept secret, do not share or display it to anyone. The token is reset every 24 hours. Then you will need to obtain another token again after 24 hours. Microsoft does not allow to generate multiple tokens. Just generate 1 token and use it for 24 hours.

Logging in with your token

const xl = new xls.Account(`XBL3.0 x=${token[1]};${token[0]}`;

this done, if there is no error, you can now manipulate data.

Make a custom request on xbox live

const opts = {
  url: "<request url>",
  method: "<method>",
  headers: {},
  data: "<data>"
}
xl.request(opts).then(data =>{
  console.log(data);
});

It is not necessary to add the authorization header because the method automatically adds it.

Finding user by gamertag

xl.people.find("<gamertag>").then(user =>{
  console.log(user);
});

Getting user by xuid

xl.people.get("<xuid>").then(user =>{
  console.log(user);
});

Getting user profile

xl.people.profile.get("<xuid>").then(user =>{
  console.log(user);
});

Getting user setting

xl.people.setting.get("<xuid>").then(user =>{
  console.log(user);
});

Getting user summary

xl.people.summary.get("<xuid>").then(user =>{
  console.log(user);
});

Getting user achievement

xl.people.achievement.get("<xuid>").then(user =>{
  console.log(user);
});

Getting user activity

xl.people.activity.get("<xuid>").then(user =>{
  console.log(user);
});

Getting user screenshot

xl.people.screenshot.get("<xuid>").then(user =>{
  console.log(user);
});

Getting user games

xl.people.games.get("<xuid>").then(user =>{
  console.log(user);
});

Finding club by name

xl.club.find("<club name>").then(console.log);

Getting club by id

xl.club.get("<club id>").then(console.log);

Getting inbox

xl.chat.inbox.get().then(console.log);

Getting chat auth

xl.chat.auth.get("<xuid>").then(console.log);

Getting message

xl.chat.message.get("<xuid>").then(console.log);

Sending message

xl.chat.message.send("<message>", "<xuid>").then(console.log);

Getting account privacy settings

xl.me.account.privacy.settings.get().then(console.log);

Getting profile

xl.me.profile.get().then(console.log);

Getting friends

xl.me.profile.friends.get().then(console.log);

Getting followers

xl.me.followers.get().then(console.log);

Getting family

xl.me.profile.family.get("<xuid>").then(console.log);

Getting groups

xl.me.groups.get().then(console.log);

Getting reports

xl.me.reports.get().then(console.log);

Getting games titles id

xl.me.games.titlesId.get().then(console.log);
1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago