About | Features | Technologies | Requirements | Starting | License | Author
The project has been created in order to be able to quickly and efficiently obtain data relating to my own VRChat account, such as the list of my groups, my represented group, all my worlds, my bio, my avatar, all members of my specific group, all bans of my specific group, all infos of my specific group etc...
And then put it all on a lightweight web server so I could have an API with a cache that would be quicker and easier to use and fetch in applications.
✔️ Login to VRChat with Puppeteer
Automate the VRChat login process using Puppeteer, including management of 2FA authentication. The process involves encoding the credentials in Base64, interacting with the login form and saving the authentication details so that the API can be used later via fetches without the need for continuous reconnection.
✔️ Retrieve User Data via API
Exposes an API endpoint for retrieving user data from scrape-generated JSON files & local backup of retrieved JSON by making requests to the official API. JSON data is read and returned as a response, with appropriate error handling for file access and parsing. All this is done with the aim of providing simpler access to data without exposing any compromising elements for your account or application.
✔️ Prompt for User Input
Utility function for prompting users to enter data via the command line. This function waits for user input and returns it as a string, which is useful for interactive scripts requiring identification or other information. As in the case of not wanting to put your password in the .env but entering it manually each time auth is initiated.
✔️ Save Authentication Details
Store encrypted login credentials, cookies and local storage data in JSON files for later use (for requests to the official API). The process includes creating the necessary directories and managing various authentication data, as well as modifying and creating JSONs for the custom API endpoint. Of course, all data remains on your own system.
✔️ Handle Errors Gracefully
Implement comprehensive error handling for file reading and JSON parsing. Proper responses and logging are in place to manage scenarios where files are missing or data is malformed.
- TypeScript
- JavaScript (After compilation)
- Concurrently
- Express
- Puppeteer
- NodeJS (ReadLine, FS, Path)
- Axios
- js-base64
Before starting 🏁, you need to have Git and Node installed.
Also create an .env file with the data entered in the template below:
NICKNAME=YourUsernameUsedInTheCreation;
PASSWORD=IfYouNeedToNotRefillAllTimeIsOptional;
USER_ID=usr_YOURIDVRCHAT;
GROUP_ID=grp_YOURGROUPID;
USER_AGENT=EXAMPLE (https://github.com/Sinoryn/VRCGetApiData)
PORT=IfYouWantToChangeTheDefaultWebAPIPort;
# Clone this project
$ git clone https://github.com/Saryniel/VRCGetApiData
# Access
$ cd VRCGetApiData
# Install dependencies
$ npm i
# Run the project
$ npm run start
# The web API will initialize in the <http://localhost:3000> by default
# The scraper will log in your console
This project is under license from MIT. For more details, see the LICENSE file.
Made with ❤️ by Saryniel