quick-barista-47240
02/26/2026, 9:19 AMpowerful-spoon-16837
02/26/2026, 9:33 AMquick-barista-47240
02/26/2026, 9:38 AMString endpoint = apiHost.trim().replaceAll("/+$", "") + "/api/features/" + clientKey.trim();
featuresRepository = GBFeaturesRepository.builder()
.endpoint(endpoint)
.build();
featuresRepository.initialize();
this code returns featuresJson = "{}"; an empty json.
how can i fix this...
Thanks..powerful-spoon-16837
02/26/2026, 9:44 AM{} response usually means one of these things:
1. No features configured in GrowthBook dashboard yet - Make sure you've actually created features/experiments in your GrowthBook admin panel and that they are in "Published" state (not draft).
2. Wrong environment Check that your clientKey matches the correct environment (dev/prod). In GrowthBook dashboard go to SDK Connections → make sure you're using the right key for the right environment.
3. Double-check the endpoint Try hitting the endpoint directly in browser/Postman:
D
<https://cdn.growthbook.io/api/features/YOUR_CLIENT_KEY>
If it returns {} there too - it's definitely a dashboard config issue, not code.
Quick checklist:
• Feature is created and published
• Feature has targeting rules or a default value set
• You're using the correct SDK key for that environment
Could you check if your features are published in the dashboard? That's most likely the issue here.