public ApiClient setAccessToken(String accessToken) {
    for (Authentication auth : authentications.values()) {
      if (auth instanceof OAuth) {
        ((OAuth) auth).setAccessToken(accessToken);
        return this;
      }
    }
    throw new RuntimeException("No OAuth2 authentication configured!");
  }
Helper method to set access token for the first OAuth2 authentication.
@param accessToken Access token
@return API client
plc4j/drivers/ctrlx/src/main/java/org/apache/plc4x/java/ctrlx/readwrite/rest/datalayer/ApiClient.java