vrchat 1.18.8 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/base.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * VRChat API Documentation
5
5
  *
6
- * The version of the OpenAPI document: 1.18.8
6
+ * The version of the OpenAPI document: 1.19.0
7
7
  * Contact: vrchatapi.lpv0t@aries.fyi
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/common.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * VRChat API Documentation
5
5
  *
6
- * The version of the OpenAPI document: 1.18.8
6
+ * The version of the OpenAPI document: 1.19.0
7
7
  * Contact: vrchatapi.lpv0t@aries.fyi
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * VRChat API Documentation
5
5
  *
6
- * The version of the OpenAPI document: 1.18.8
6
+ * The version of the OpenAPI document: 1.19.0
7
7
  * Contact: vrchatapi.lpv0t@aries.fyi
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -0,0 +1,21 @@
1
+ const vrchat = require("vrchat");
2
+
3
+ const configuration = new vrchat.Configuration({
4
+ username: "username",
5
+ password: "password",
6
+ baseOptions: {
7
+ headers: {
8
+ "User-Agent": "ExampleProgram/0.0.1 my@email.com"
9
+ "Cookie": "auth=[AUTH_COOKIE_HERE]; twoFactorAuth=[TWO_FACTOR_AUTH_COOKIE_HERE]}"
10
+ }
11
+ }
12
+ });
13
+
14
+ const AuthenticationApi = new vrchat.AuthenticationApi(configuration);
15
+
16
+ async function main() {
17
+ const currentUser = (await AuthenticationApi.getCurrentUser()).data;
18
+ console.log(`Logged in as: ${currentUser.displayName}`);
19
+ }
20
+
21
+ main();
@@ -0,0 +1,40 @@
1
+ const vrchat = require("vrchat");
2
+
3
+ const readline = require("readline")
4
+ import globalAxios from "axios"
5
+
6
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
7
+ const prompt = (query) => new Promise((resolve) => rl.question(query, resolve));
8
+
9
+
10
+ const configuration = new vrchat.Configuration({
11
+ username: "username",
12
+ password: "password",
13
+ baseOptions: {
14
+ headers: { "User-Agent": "ExampleProgram/0.0.1 my@email.com"}
15
+ }
16
+ });
17
+
18
+
19
+ const authenticationApi = new AuthenticationApi(configuration);
20
+
21
+ async function main() {
22
+ var currentUser = (await authenticationApi.getCurrentUser()).data
23
+
24
+ if (currentUser["requiresTwoFactorAuth"] && currentUser["requiresTwoFactorAuth"][0] === "emailOtp") {
25
+ await authenticationApi.verify2FAEmailCode({ code: await prompt("email Code\n") })
26
+ currentUser = (await authenticationApi.getCurrentUser()).data;
27
+ }
28
+ if (currentUser["requiresTwoFactorAuth"] && currentUser["requiresTwoFactorAuth"][0] === "totp") {
29
+ await authenticationApi.verify2FA({ code: await prompt("2fa Code\n") })
30
+ currentUser = (await authenticationApi.getCurrentUser()).data;
31
+ }
32
+
33
+ console.log(`Logged in as: ${currentUser.displayName}`);
34
+
35
+ const store = globalAxios.defaults.jar.store.idx["api.vrchat.cloud"]["/"];
36
+ console.log(`auth=${store["auth"]["value"]}`)
37
+ console.log(`twoFactorAuth=${store["twoFactorAuth"]["value"]}`)
38
+ }
39
+
40
+ main();