API usage example in Java
To help you get started with using Feature Upvote’s public REST API, here’s an example in Java you can copy and paste. It will list all of your feedback boards.
Make sure to add your own API key! It’s found here, in your Account profile.
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
// Requires Java 25+
public class ApiDemo {
// Base URL for the Feature Upvote API v1
private static final String BASE_URL = "https://api.featureupvote.com/api/v1/";
// Replace this value with your actual Feature Upvote API key
private static final String API_KEY = "YOUR_API_KEY_HERE";
void main() throws IOException, InterruptedException {
HttpClient client = HttpClient.newHttpClient();
// Construct the API endpoint for listing boards
String endpointUrl = BASE_URL + "boards";
// Build the HTTP GET request with Bearer Authentication
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(endpointUrl))
.header("Authorization", "Bearer " + API_KEY)
.header("Accept", "application/json")
.GET()
.build();
// Send the request and receive the response
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
// Output the results
IO.println("HTTP Status Code: " + response.statusCode());
IO.println("JSON Response:\n" + response.body());
}
}