const rewardsAppId = 'YOUR_REWARDS_APP_ID';
const jwtToken = 'YOUR_JWT_TOKEN';
const response = await fetch(`https://api.zbdpay.com/api/v1/rewards/app/${rewardsAppId}/api-key`, {
method: 'POST',
headers: {
'z-client': 'developer-dashboard',
'Authorization': `Bearer ${jwtToken}`
}
});
const data = await response.json();
if (data.success) {
console.log('API Key created:', data.data.apiKey);
// IMPORTANT: Store this key in your environment variables
// It will not be shown again!
} else {
console.error('Error:', data.message);
}