Пытался подключиться к API DonationAlerts но он выводит 'Unauthenticated.'
public static void main(String[] args) throws Exception {
String API = "API_TOKEN";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.donationalerts.com/api/v1/alerts/donations"))
.header("Authorization", "Bearer " + API)
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}