# app-xbox-live

> App Xbox Live Api

Latest version **1.2.8** (published 2023-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install app-xbox-live
pnpm add app-xbox-live
yarn add app-xbox-live
bun add app-xbox-live
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.8 |
| Published | 2023-08-21 |
| First published | 2021-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 36.7 KB |
| Known vulnerabilities | 0 (+25 in 2 direct dependencies) |
| Install scripts | no |
| Author | Rafael |
| Maintainers | desendev |

## Links

- npm: https://www.npmjs.com/package/app-xbox-live
- Repository: https://github.com/Unbreak4ble/app-xbox-live
- Homepage: https://github.com/Unbreak4ble/app-xbox-live#readme
- Issues: https://github.com/Unbreak4ble/app-xbox-live/issues
- npm.io page: https://npm.io/package/app-xbox-live

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) 0.27.2
- [cookie](https://npm.io/package/cookie.md) 0.5.0
- [query-string](https://npm.io/package/query-string.md) 6.14.1

## Recent versions

- 1.2.8 (latest) — 2023-08-21
- 1.2.7 — 2021-05-15
- 1.2.6 — 2021-05-15
- 1.2.5 — 2021-04-15
- 1.2.4 — 2021-04-13
- 1.2.3 — 2021-04-11
- 1.2.2 — 2021-04-11
- 1.2.1 — 2021-04-11
- 1.2.0 — 2021-04-11
- 1.1.9 — 2021-04-11
- 1.1.7 — 2021-04-11
- 1.1.6 — 2021-04-11
- 1.1.5 — 2021-04-11
- 1.1.4 — 2021-04-09
- 1.1.3 — 2021-04-08
- … 13 more at https://npm.io/package/app-xbox-live/versions

## README

<h1 align="center">App Xbox Live Api</h1>
<p align="center">
    <img src="https://img.shields.io/npm/dm/app-xbox-live.svg">
</p>


## Install
```bash
npm i app-xbox-live
```

## Getting started
- getting account token:
```javascript
const axl = require("app-xbox-live");

const token = await axl.Token("<your email>", "<your password>");
//output: ["token", "uhs"]
```
Note: For 2-step accounts, authorization from the owner is required.

Security: never display your token to anyone.


## authentication alternatives
- setup token:
```javascript
const xl = new axl.Account(`XBL3.0 x=${token};${uhs});
```
- logging with credentials:
```javascript
const xl = await axl.Login("<email>", "<password>");
```

<h1 align="center">Avaiable methods</h1>
<h2 align="center"> Request </h2>

### Make a custom request
```javascript
const opts = {
  url: "<request url>",
  method: "<method>",
  ...
}
xl.request(opts).then(data =>{
  console.log(data);
});
```
It is not necessary to add the authorization header because the method automatically adds it.


<h2 align="center"> People </h2>

### Finding user by gamertag
```javascript
const amount = 15;
xl.people.find("<gamertag>", amount).then(console.log);
```

### Getting user by xuid
```javascript
xl.people.get("<xuid>").then(console.log);
```

### Getting user profile
```javascript
xl.people.profile.get("<xuid>").then(console.log);
//     OR
xl.people.profile.get(["<xuids>"]).then(console.log);
```

### Getting recommendation users
```javascript
xl.people.recommendation.get().then(console.log);
```

### Getting user setting
```javascript
xl.people.setting.get("<xuid>").then(console.log);
```

### Getting user summary
```javascript
xl.people.summary.get("<xuid>").then(console.log);
```

### Getting all the user achievement
```javascript
xl.people.achievement.all.get("<xuid>").then(console.log);
```

### Getting specific user achievement
```javascript
xl.people.achievement.get("<xuid>", titleId, amount).then(console.log);
```

### Getting user achievement stats
```javascript
xl.people.achievement.stats.get("<xuid>", titleId).then(console.log);
//     OR
xl.people.achievement.stats.get(["<xuids>"], titleId).then(console.log);
```

### Getting user achievement titles
```javascript
xl.people.achievement.titles.get("<xuid>").then(console.log);
```

### Getting complete user achievement titles
```javascript
xl.people.achievement.titles.complete.get("<xuid>").then(console.log);
```

### Getting user achievement titles
```javascript
xl.people.achievement.titles.get("<xuid>").then(user =>{
  console.log(user);
});
```

### Getting user activity
```javascript
const amount = 100;
xl.people.activity.get("<xuid>", amount).then(console.log);
```

### Getting user screenshot
```javascript
const amount = 100;
xl.people.screenshot.get("<xuid>", amount).then(console.log);
```

### Getting user games
```javascript
xl.people.games.get("<xuid>").then(console.log);
```

### Getting user presence
```javascript
xl.people.presence.get("<xuid>").then(console.log);
//     OR
xl.people.presence.get(["<xuids>"]).then(console.log);
```

### Adding friend
```javascript
xl.people.add("<xuid>").then(() =>{
  console.log("success");
});
//    OR
xl.people.add(["<xuids>"]).then(() =>{
  console.log("success");
});
```

### Removing friend
```javascript
xl.people.remove("<xuid>").then(() =>{
  console.log("success");
});
//     OR
xl.people.remove(["<xuids>"]).then(() =>{
  console.log("success");
});
```

### Getting user gameclip
```javascript
xl.people.gameclip.get("<xuid>", amount).then(console.log);
```

### Getting user clubs
```javascript
xl.people.clubs.get("<xuid>").then(console.log);
```

### Getting user friends
```javascript
xl.people.friends.get("<xuid>").then(console.log);
```

### Getting gameclip
```javascript
xl.people.gameclip.get("<xuid>", amount).then(console.log);
```


<h2 align="center"> Club </h2>

### Finding club by name
```javascript
xl.club.find("<club name>").then(console.log);
```

### Getting club by id
```javascript
xl.club.get("<club id>").then(console.log);
```

### Getting club feed
```javascript
const amount = 50;
xl.club.feed.get("<club id>", amount).then(console.log);
```

### Sending club feed
```javascript
xl.club.feed.send("<club id>", "<message>").then(console.log);
```

### Getting club chat
```javascript
const amount = 50;
xl.club.chat.get("<club id>", amount).then(console.log);
```

<h2 align="center"> Chat </h2>

### Getting inbox
```javascript
xl.chat.inbox.get().then(console.log);
```

### Getting chat auth
```javascript
xl.chat.auth.get("<xuid>").then(console.log);
```

### Getting message
```javascript
const amount = 100;
xl.chat.message.get("<xuid>", amount).then(console.log);
```

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


<h2 align="center"> title </h2>

### Getting title by id
```javascript
xl.title.get("<id>").then(console.log);
//     OR
xl.title.get(["<ids>"]).then(console.log);
```


<h2 align="center"> title </h2>

### Getting title by id
```javascript
xl.title.get("<id>").then(console.log);
```



<h2 align="center"> Me </h2>

### Getting account privacy settings
```javascript
xl.me.account.privacy.settings.get().then(console.log);
```

### Getting profile
```javascript
xl.me.profile.get().then(console.log);
```

### Getting friends
```javascript
xl.me.profile.friends.get().then(console.log);
```

### Getting followers
```javascript
xl.me.followers.get().then(console.log);
```

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

### Getting groups
```javascript
xl.me.groups.get().then(console.log);
```

### Getting reports
```javascript
xl.me.reports.get().then(console.log);
```

### Getting games titles id
```javascript
xl.me.games.titlesId.get().then(console.log);
```

---
_Source: https://npm.io/package/app-xbox-live · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
