0.0.10 • Published 5 days ago
vrc.js v0.0.10
vrc.js
Whats this?
Unofficial VRChat API Wrapper
<!> Warning <!>
This module is work-in-progress.
So this contains bugs probably.
Install
npm i vrc.js
Example - Fetching your VRC information
const { Client } = require("vrc.js");
const client = new Client({
username: VRCHAT_USERNAME,
password: VRCHAT_PASSWORD,
email: VRCHAT_EMAIL
});
void async function main() {
const clientUser = await client.authorize();
if (!clientUser.expectedStructure) {
console.error("[ERR]", clientUser.rawResponse);
process.exit(0);
}
console.log(clientUser.data.onlineFriends);
console.log(clientUser.data.presence);
}();
Example - 2FA varification
const { Client } = require("vrc.js");
const client = new Client({
username: VRCHAT_USERNAME,
password: VRCHAT_PASSWORD,
email: VRCHAT_EMAIL
});
client.verifyWith2FA(VRCHAT_2FA_CODE);
Where cookie data is saved
In the .cookie
file in the current directory.
About anything else
See the implementaion(vrc.js/dist/index.js) or the type-definition(*.d.ts).