Skip to content

Commit 5fe13ba

Browse files
committed
Authenticating automatically sets apiKey
1 parent 6f822b6 commit 5fe13ba

2 files changed

Lines changed: 0 additions & 11 deletions

File tree

‎README.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ AuthenticationApi authApi = new AuthenticationApi(defaultClient);
6060
HttpBasicAuth authHeader = (HttpBasicAuth) defaultClient.getAuthentication("authHeader");
6161
authHeader.setUsername("username");
6262
authHeader.setPassword("password");
63-
// Also configure API key
64-
ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie");
65-
authCookie.setApiKey("JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26");
6663

6764
// Step 3. Call getCurrentUser on Authentication API.
6865
// This logs you in if the user isn't already logged in.

‎examples/src/main/java/io/github/vrchatapi/demo/Demo.java‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package io.github.vrchatapi.demo;
22

3-
import java.util.List;
4-
import java.util.Map.Entry;
5-
import java.util.stream.Collectors;
6-
73
import io.github.vrchatapi.*;
84
import io.github.vrchatapi.auth.*;
95
import io.github.vrchatapi.api.*;
@@ -15,18 +11,14 @@ public static void main(String[] args) throws ApiException {
1511
// Step 1. VRChat consists of several API's
1612
// e.g. (WorldsApi, UsersApi, FilesApi, NotificationsApi, FriendsApi, etc...)
1713
// Here we instantiate the Authentication API which is required for logging in.
18-
// We also instantiate the System API for fetching the API key needed for future requests.
1914
ApiClient defaultClient = Configuration.getDefaultApiClient();
2015
AuthenticationApi authApi = new AuthenticationApi(defaultClient);
21-
SystemApi systemApi = new SystemApi(defaultClient);
2216

2317
// Step 2. We begin with creating a Configuration
2418
// This contains the username and password for authentication.
2519
HttpBasicAuth authHeader = (HttpBasicAuth) defaultClient.getAuthentication("authHeader");
2620
authHeader.setUsername("username");
2721
authHeader.setPassword("password");
28-
// Also fetch API key. Fetching the Config sets the API key as a cookie.
29-
systemApi.getConfig();
3022

3123
// Step 3. Call getCurrentUser on Authentication API.
3224
// This logs you in if the user isn't already logged in.

0 commit comments

Comments
 (0)