target fix
This commit is contained in:
@@ -24,8 +24,8 @@ public class TargetingCampaignController {
|
||||
private final TargetingCampaignService campaignService;
|
||||
private final AudienceSegmentationService audienceService;
|
||||
private final BudgetOptimizerService budgetOptimizerService;
|
||||
private final FacebookAdsService facebookAdsService;
|
||||
private final TikTokAdsService tikTokAdsService;
|
||||
// private final FacebookAdsService facebookAdsService;
|
||||
// private final TikTokAdsService tikTokAdsService;
|
||||
private final ABTestingService abTestingService;
|
||||
private final MarketingAnalysisV3Repository analysisRepository;
|
||||
private final SocialMediaCredentialsService credentialsService;
|
||||
@@ -149,64 +149,64 @@ public class TargetingCampaignController {
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
// --- Facebook OAuth ---
|
||||
|
||||
@GetMapping("/facebook/oauth-url")
|
||||
public ResponseEntity<Map<String, String>> getFbOauthUrl(@RequestHeader("X-User-Id") String userId) {
|
||||
log.info("[Targeting] FB OAuth URL requested by {}", userId);
|
||||
return ResponseEntity.ok(Map.of("url", facebookAdsService.getOAuthUrl(userId)));
|
||||
}
|
||||
|
||||
@GetMapping("/facebook/callback")
|
||||
public ResponseEntity<String> fbCallback(
|
||||
@RequestParam String code,
|
||||
@RequestParam String state) {
|
||||
log.info("[Targeting] FB Callback received for state/userId: {}", state);
|
||||
try {
|
||||
facebookAdsService.exchangeCodeForToken(code, state);
|
||||
return ResponseEntity.ok("Facebook Ads account successfully linked!");
|
||||
} catch (Exception e) {
|
||||
log.error("[Targeting] FB Callback error", e);
|
||||
return ResponseEntity.badRequest().body("Facebook integration failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/facebook/ad-accounts")
|
||||
public ResponseEntity<List<FacebookAdAccountDto>> getFbAdAccounts(
|
||||
@RequestHeader("X-User-Id") String userId,
|
||||
@RequestHeader("Authorization") String token) {
|
||||
log.info("[Targeting] Get FB Ad Accounts");
|
||||
// token passed via header or db; assuming passed directly here for dynamic use or fetched via service inside
|
||||
return ResponseEntity.ok(facebookAdsService.getAdAccounts(token.replace("Bearer ", "")));
|
||||
}
|
||||
|
||||
// --- TikTok OAuth ---
|
||||
|
||||
@GetMapping("/tiktok/oauth-url")
|
||||
public ResponseEntity<Map<String, String>> getTtOauthUrl(@RequestHeader("X-User-Id") String userId) {
|
||||
log.info("[Targeting] TT OAuth URL requested by {}", userId);
|
||||
return ResponseEntity.ok(Map.of("url", tikTokAdsService.getOAuthUrl(userId)));
|
||||
}
|
||||
|
||||
@GetMapping("/tiktok/callback")
|
||||
public ResponseEntity<String> ttCallback(
|
||||
@RequestParam String auth_code,
|
||||
@RequestParam String state) {
|
||||
log.info("[Targeting] TT Callback received for state/userId: {}", state);
|
||||
try {
|
||||
tikTokAdsService.exchangeCodeForToken(auth_code, state);
|
||||
return ResponseEntity.ok("TikTok Ads account successfully linked!");
|
||||
} catch (Exception e) {
|
||||
log.error("[Targeting] TT Callback error", e);
|
||||
return ResponseEntity.badRequest().body("TikTok integration failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/tiktok/advertisers")
|
||||
public ResponseEntity<List<Map<String, Object>>> getTtAdvertisers(
|
||||
@RequestHeader("X-User-Id") String userId,
|
||||
@RequestHeader("Authorization") String token) {
|
||||
log.info("[Targeting] Get TT Advertisers");
|
||||
return ResponseEntity.ok(tikTokAdsService.getAdvertisers(token.replace("Bearer ", "")));
|
||||
}
|
||||
// // --- Facebook OAuth ---
|
||||
//
|
||||
// @GetMapping("/facebook/oauth-url")
|
||||
// public ResponseEntity<Map<String, String>> getFbOauthUrl(@RequestHeader("X-User-Id") String userId) {
|
||||
// log.info("[Targeting] FB OAuth URL requested by {}", userId);
|
||||
// return ResponseEntity.ok(Map.of("url", facebookAdsService.getOAuthUrl(userId)));
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/facebook/callback")
|
||||
// public ResponseEntity<String> fbCallback(
|
||||
// @RequestParam String code,
|
||||
// @RequestParam String state) {
|
||||
// log.info("[Targeting] FB Callback received for state/userId: {}", state);
|
||||
// try {
|
||||
// facebookAdsService.exchangeCodeForToken(code, state);
|
||||
// return ResponseEntity.ok("Facebook Ads account successfully linked!");
|
||||
// } catch (Exception e) {
|
||||
// log.error("[Targeting] FB Callback error", e);
|
||||
// return ResponseEntity.badRequest().body("Facebook integration failed: " + e.getMessage());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/facebook/ad-accounts")
|
||||
// public ResponseEntity<List<FacebookAdAccountDto>> getFbAdAccounts(
|
||||
// @RequestHeader("X-User-Id") String userId,
|
||||
// @RequestHeader("Authorization") String token) {
|
||||
// log.info("[Targeting] Get FB Ad Accounts");
|
||||
// // token passed via header or db; assuming passed directly here for dynamic use or fetched via service inside
|
||||
// return ResponseEntity.ok(facebookAdsService.getAdAccounts(token.replace("Bearer ", "")));
|
||||
// }
|
||||
//
|
||||
// // --- TikTok OAuth ---
|
||||
//
|
||||
// @GetMapping("/tiktok/oauth-url")
|
||||
// public ResponseEntity<Map<String, String>> getTtOauthUrl(@RequestHeader("X-User-Id") String userId) {
|
||||
// log.info("[Targeting] TT OAuth URL requested by {}", userId);
|
||||
// return ResponseEntity.ok(Map.of("url", tikTokAdsService.getOAuthUrl(userId)));
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/tiktok/callback")
|
||||
// public ResponseEntity<String> ttCallback(
|
||||
// @RequestParam String auth_code,
|
||||
// @RequestParam String state) {
|
||||
// log.info("[Targeting] TT Callback received for state/userId: {}", state);
|
||||
// try {
|
||||
// tikTokAdsService.exchangeCodeForToken(auth_code, state);
|
||||
// return ResponseEntity.ok("TikTok Ads account successfully linked!");
|
||||
// } catch (Exception e) {
|
||||
// log.error("[Targeting] TT Callback error", e);
|
||||
// return ResponseEntity.badRequest().body("TikTok integration failed: " + e.getMessage());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/tiktok/advertisers")
|
||||
// public ResponseEntity<List<Map<String, Object>>> getTtAdvertisers(
|
||||
// @RequestHeader("X-User-Id") String userId,
|
||||
// @RequestHeader("Authorization") String token) {
|
||||
// log.info("[Targeting] Get TT Advertisers");
|
||||
// return ResponseEntity.ok(tikTokAdsService.getAdvertisers(token.replace("Bearer ", "")));
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Service
|
||||
//@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class FacebookAdsService {
|
||||
|
||||
@@ -42,8 +42,8 @@ public class TargetingCampaignService {
|
||||
private final AiTargetologistService aiService;
|
||||
private final AiTargetingSystemService aiTargetingSystemService;
|
||||
private final ABTestingService abTestingService;
|
||||
private final FacebookAdsService facebookAdsService;
|
||||
private final TikTokAdsService tikTokAdsService;
|
||||
// private final FacebookAdsService facebookAdsService;
|
||||
// private final TikTokAdsService tikTokAdsService;
|
||||
private final SocialMediaCredentialsService credentialsService;
|
||||
private final TargetingInsightService insightService;
|
||||
private final MarketingStrategyRepository strategyRepository;
|
||||
@@ -192,67 +192,67 @@ public class TargetingCampaignService {
|
||||
}
|
||||
|
||||
private void publishToPlatforms(TargetingCampaign campaign, String userId) {
|
||||
boolean allSuccess = true;
|
||||
|
||||
if (campaign.getPlatforms() != null) {
|
||||
// FB / IG
|
||||
if (campaign.getPlatforms().contains(kz.konturai.parser.enums.TargetingPlatform.FACEBOOK) ||
|
||||
campaign.getPlatforms().contains(kz.konturai.parser.enums.TargetingPlatform.INSTAGRAM)) {
|
||||
|
||||
String fbToken = credentialsService.getCredentials(userId, "FACEBOOK");
|
||||
if (fbToken != null) {
|
||||
try {
|
||||
SocialMediaCredentials creds = credentialsService.getUserCredentials(userId).stream()
|
||||
.filter(c -> "facebook".equalsIgnoreCase(c.getPlatform()))
|
||||
.findFirst().orElse(null);
|
||||
String adAccountId = (creds != null && creds.getAdAccountId() != null)
|
||||
? creds.getAdAccountId() : "placeholder_ad_account";
|
||||
|
||||
String fbCampId = facebookAdsService.createCampaign(fbToken, adAccountId, campaign);
|
||||
if (fbCampId != null) {
|
||||
campaign.getExternalIds().put("FACEBOOK", fbCampId);
|
||||
log.info("Created FB Campaign {}", fbCampId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to create FB campaign", e);
|
||||
allSuccess = false;
|
||||
}
|
||||
} else {
|
||||
log.warn("Missing FB credentials for user {}", userId);
|
||||
allSuccess = false;
|
||||
}
|
||||
}
|
||||
|
||||
// TikTok
|
||||
if (campaign.getPlatforms().contains(kz.konturai.parser.enums.TargetingPlatform.TIKTOK)) {
|
||||
String ttToken = credentialsService.getCredentials(userId, "TIKTOK");
|
||||
if (ttToken != null) {
|
||||
try {
|
||||
SocialMediaCredentials creds = credentialsService.getUserCredentials(userId).stream()
|
||||
.filter(c -> "tiktok".equalsIgnoreCase(c.getPlatform()))
|
||||
.findFirst().orElse(null);
|
||||
String ttAdvId = (creds != null && creds.getAdAccountId() != null)
|
||||
? creds.getAdAccountId() : "placeholder_tt_adv";
|
||||
|
||||
String ttCampId = tikTokAdsService.createCampaign(ttToken, ttAdvId, campaign);
|
||||
if (ttCampId != null) {
|
||||
campaign.getExternalIds().put("TIKTOK", ttCampId);
|
||||
log.info("Created TT Campaign {}", ttCampId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to create TT campaign", e);
|
||||
allSuccess = false;
|
||||
}
|
||||
} else {
|
||||
log.warn("Missing TT credentials for user {}", userId);
|
||||
allSuccess = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!allSuccess) {
|
||||
campaign.setStatus("failed");
|
||||
}
|
||||
// boolean allSuccess = true;
|
||||
//
|
||||
// if (campaign.getPlatforms() != null) {
|
||||
// // FB / IG
|
||||
// if (campaign.getPlatforms().contains(kz.konturai.parser.enums.TargetingPlatform.FACEBOOK) ||
|
||||
// campaign.getPlatforms().contains(kz.konturai.parser.enums.TargetingPlatform.INSTAGRAM)) {
|
||||
//
|
||||
// String fbToken = credentialsService.getCredentials(userId, "FACEBOOK");
|
||||
// if (fbToken != null) {
|
||||
// try {
|
||||
// SocialMediaCredentials creds = credentialsService.getUserCredentials(userId).stream()
|
||||
// .filter(c -> "facebook".equalsIgnoreCase(c.getPlatform()))
|
||||
// .findFirst().orElse(null);
|
||||
// String adAccountId = (creds != null && creds.getAdAccountId() != null)
|
||||
// ? creds.getAdAccountId() : "placeholder_ad_account";
|
||||
//
|
||||
// String fbCampId = facebookAdsService.createCampaign(fbToken, adAccountId, campaign);
|
||||
// if (fbCampId != null) {
|
||||
// campaign.getExternalIds().put("FACEBOOK", fbCampId);
|
||||
// log.info("Created FB Campaign {}", fbCampId);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.error("Failed to create FB campaign", e);
|
||||
// allSuccess = false;
|
||||
// }
|
||||
// } else {
|
||||
// log.warn("Missing FB credentials for user {}", userId);
|
||||
// allSuccess = false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // TikTok
|
||||
// if (campaign.getPlatforms().contains(kz.konturai.parser.enums.TargetingPlatform.TIKTOK)) {
|
||||
// String ttToken = credentialsService.getCredentials(userId, "TIKTOK");
|
||||
// if (ttToken != null) {
|
||||
// try {
|
||||
// SocialMediaCredentials creds = credentialsService.getUserCredentials(userId).stream()
|
||||
// .filter(c -> "tiktok".equalsIgnoreCase(c.getPlatform()))
|
||||
// .findFirst().orElse(null);
|
||||
// String ttAdvId = (creds != null && creds.getAdAccountId() != null)
|
||||
// ? creds.getAdAccountId() : "placeholder_tt_adv";
|
||||
//
|
||||
// String ttCampId = tikTokAdsService.createCampaign(ttToken, ttAdvId, campaign);
|
||||
// if (ttCampId != null) {
|
||||
// campaign.getExternalIds().put("TIKTOK", ttCampId);
|
||||
// log.info("Created TT Campaign {}", ttCampId);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.error("Failed to create TT campaign", e);
|
||||
// allSuccess = false;
|
||||
// }
|
||||
// } else {
|
||||
// log.warn("Missing TT credentials for user {}", userId);
|
||||
// allSuccess = false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (!allSuccess) {
|
||||
// campaign.setStatus("failed");
|
||||
// }
|
||||
}
|
||||
|
||||
public TargetingCampaign getCampaignById(String id, String userId) {
|
||||
@@ -272,13 +272,13 @@ public class TargetingCampaignService {
|
||||
TargetingCampaign campaign = getCampaignById(campaignId, userId);
|
||||
campaign.setStatus("paused");
|
||||
|
||||
Map<String, String> ids = campaign.getExternalIds();
|
||||
if (ids != null) {
|
||||
if (ids.containsKey("FACEBOOK")) {
|
||||
facebookAdsService.pauseCampaign(credentialsService.getCredentials(userId, "FACEBOOK"), ids.get("FACEBOOK"));
|
||||
}
|
||||
// Add TikTok pause when needed
|
||||
}
|
||||
// Map<String, String> ids = campaign.getExternalIds();
|
||||
// if (ids != null) {
|
||||
// if (ids.containsKey("FACEBOOK")) {
|
||||
// facebookAdsService.pauseCampaign(credentialsService.getCredentials(userId, "FACEBOOK"), ids.get("FACEBOOK"));
|
||||
// }
|
||||
// // Add TikTok pause when needed
|
||||
// }
|
||||
|
||||
addStatusHistory(campaign, "PAUSED", "Campaign manually paused");
|
||||
return repository.save(campaign);
|
||||
@@ -288,13 +288,13 @@ public class TargetingCampaignService {
|
||||
TargetingCampaign campaign = getCampaignById(campaignId, userId);
|
||||
campaign.setStatus("active");
|
||||
|
||||
Map<String, String> ids = campaign.getExternalIds();
|
||||
if (ids != null) {
|
||||
if (ids.containsKey("FACEBOOK")) {
|
||||
facebookAdsService.resumeCampaign(credentialsService.getCredentials(userId, "FACEBOOK"), ids.get("FACEBOOK"));
|
||||
}
|
||||
// Add TikTok resume when needed
|
||||
}
|
||||
// Map<String, String> ids = campaign.getExternalIds();
|
||||
// if (ids != null) {
|
||||
// if (ids.containsKey("FACEBOOK")) {
|
||||
// facebookAdsService.resumeCampaign(credentialsService.getCredentials(userId, "FACEBOOK"), ids.get("FACEBOOK"));
|
||||
// }
|
||||
// // Add TikTok resume when needed
|
||||
// }
|
||||
|
||||
addStatusHistory(campaign, "RESUMED", "Campaign manually resumed");
|
||||
return repository.save(campaign);
|
||||
|
||||
@@ -20,8 +20,8 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
public class TargetingInsightService {
|
||||
|
||||
private final FacebookAdsService facebookAdsService;
|
||||
private final TikTokAdsService tikTokAdsService;
|
||||
// private final FacebookAdsService facebookAdsService;
|
||||
// private final TikTokAdsService tikTokAdsService;
|
||||
private final SocialMediaCredentialsService credentialsService;
|
||||
|
||||
public List<TargetingInsight> generateTargetingInsights(TargetingCampaign campaign) {
|
||||
@@ -37,30 +37,30 @@ public class TargetingInsightService {
|
||||
String userId = campaign.getUserId();
|
||||
|
||||
try {
|
||||
if (externalIds.containsKey("FACEBOOK") || externalIds.containsKey("INSTAGRAM")) {
|
||||
String fbToken = credentialsService.getCredentials(userId, "FACEBOOK");
|
||||
if (fbToken != null) {
|
||||
String fbCampaignId = externalIds.getOrDefault("FACEBOOK", externalIds.get("INSTAGRAM"));
|
||||
InstagramInsightDto fbInsights = facebookAdsService.getInsights(fbToken, fbCampaignId, "last_3d");
|
||||
insights.add(buildInsight("FACEBOOK", "CTR", fbInsights.getCtr()));
|
||||
insights.add(buildInsight("FACEBOOK", "CPM", fbInsights.getCpm()));
|
||||
insights.add(buildInsight("FACEBOOK", "SPEND", fbInsights.getSpend()));
|
||||
}
|
||||
}
|
||||
|
||||
if (externalIds.containsKey("TIKTOK")) {
|
||||
String ttToken = credentialsService.getCredentials(userId, "TIKTOK");
|
||||
if (ttToken != null) {
|
||||
String ttCampaignId = externalIds.get("TIKTOK");
|
||||
String today = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
// Let's assume advertiser_id is known or saved in credentials, use a placeholder here
|
||||
String advertiserId = "placeholder_adv_id";
|
||||
TikTokCampaignDto ttInsights = tikTokAdsService.getCampaignInsights(ttToken, advertiserId, ttCampaignId, today, today);
|
||||
insights.add(buildInsight("TIKTOK", "CTR", ttInsights.getCtr()));
|
||||
insights.add(buildInsight("TIKTOK", "CPM", ttInsights.getCpm()));
|
||||
insights.add(buildInsight("TIKTOK", "SPEND", ttInsights.getSpend()));
|
||||
}
|
||||
}
|
||||
// if (externalIds.containsKey("FACEBOOK") || externalIds.containsKey("INSTAGRAM")) {
|
||||
// String fbToken = credentialsService.getCredentials(userId, "FACEBOOK");
|
||||
// if (fbToken != null) {
|
||||
// String fbCampaignId = externalIds.getOrDefault("FACEBOOK", externalIds.get("INSTAGRAM"));
|
||||
// InstagramInsightDto fbInsights = facebookAdsService.getInsights(fbToken, fbCampaignId, "last_3d");
|
||||
// insights.add(buildInsight("FACEBOOK", "CTR", fbInsights.getCtr()));
|
||||
// insights.add(buildInsight("FACEBOOK", "CPM", fbInsights.getCpm()));
|
||||
// insights.add(buildInsight("FACEBOOK", "SPEND", fbInsights.getSpend()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (externalIds.containsKey("TIKTOK")) {
|
||||
// String ttToken = credentialsService.getCredentials(userId, "TIKTOK");
|
||||
// if (ttToken != null) {
|
||||
// String ttCampaignId = externalIds.get("TIKTOK");
|
||||
// String today = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
// // Let's assume advertiser_id is known or saved in credentials, use a placeholder here
|
||||
// String advertiserId = "placeholder_adv_id";
|
||||
// TikTokCampaignDto ttInsights = tikTokAdsService.getCampaignInsights(ttToken, advertiserId, ttCampaignId, today, today);
|
||||
// insights.add(buildInsight("TIKTOK", "CTR", ttInsights.getCtr()));
|
||||
// insights.add(buildInsight("TIKTOK", "CPM", ttInsights.getCpm()));
|
||||
// insights.add(buildInsight("TIKTOK", "SPEND", ttInsights.getSpend()));
|
||||
// }
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to generate targeting insights for campaign {}", campaign.getId(), e);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
//@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class TikTokAdsService {
|
||||
|
||||
@@ -98,6 +98,7 @@ spring.mail.password=your-app-password
|
||||
spring.mail.properties.mail.smtp.auth=true
|
||||
spring.mail.properties.mail.smtp.starttls.enable=true
|
||||
spring.mail.properties.mail.smtp.starttls.required=true
|
||||
management.health.mail.enabled=false
|
||||
|
||||
deep-research.api.url=http://185.35.223.45:3051
|
||||
deep-research.api.timeout=1800000
|
||||
@@ -110,24 +111,24 @@ posting.scheduler.enabled=true
|
||||
|
||||
telegram.api.timeout=30000
|
||||
|
||||
facebook.api.timeout=30000
|
||||
facebook.verify.token=konturAI
|
||||
facebook.page.access.token=EAAaocqgT3JoBQtNeU4uqBrywSRwGmFZBQDZBnd1ynWjX070wAa09QBKebjrd9vyjAZCiJuZAZCU8266VlJYTAfwue20QNvENgM3wpjWNmCrTO0gTMAkmPZBKZBXKvZA8eCA4aZCUhmU2jsBRluYqKUyqpYV3ZCK928OVqLqCNZCUhqU6nUU0xP0DOzk90x58tmxpS2y1i7hjQZDZD
|
||||
|
||||
# Targeting Module Configuration
|
||||
targeting.kzt-usd-rate=460.0
|
||||
|
||||
targeting.facebook.app-id=${FACEBOOK_APP_ID:dummy-app-id}
|
||||
targeting.facebook.app-secret=${FACEBOOK_APP_SECRET:dummy-app-secret}
|
||||
targeting.facebook.oauth-redirect-uri=${FACEBOOK_REDIRECT_URI:http://localhost:8080/api/v1/targeting/facebook/callback}
|
||||
targeting.facebook.graph-api-version=v19.0
|
||||
targeting.facebook.rate-limit-retry-ms=5000
|
||||
targeting.facebook.max-retries=3
|
||||
|
||||
targeting.tiktok.app-id=${TIKTOK_APP_ID:dummy-app-id}
|
||||
targeting.tiktok.app-secret=${TIKTOK_APP_SECRET:dummy-app-secret}
|
||||
targeting.tiktok.oauth-redirect-uri=${TIKTOK_REDIRECT_URI:http://localhost:8080/api/v1/targeting/tiktok/callback}
|
||||
targeting.tiktok.base-url=https://business-api.tiktok.com/open_api/v1.3
|
||||
# facebook.api.timeout=30000
|
||||
# facebook.verify.token=konturAI
|
||||
# facebook.page.access.token=EAAaocqgT3JoBQtNeU4uqBrywSRwGmFZBQDZBnd1ynWjX070wAa09QBKebjrd9vyjAZCiJuZAZCU8266VlJYTAfwue20QNvENgM3wpjWNmCrTO0gTMAkmPZBKZBXKvZA8eCA4aZCUhmU2jsBRluYqKUyqpYV3ZCK928OVqLqCNZCUhqU6nUU0xP0DOzk90x58tmxpS2y1i7hjQZDZD
|
||||
#
|
||||
# # Targeting Module Configuration
|
||||
# targeting.kzt-usd-rate=460.0
|
||||
#
|
||||
# targeting.facebook.app-id=${FACEBOOK_APP_ID:dummy-app-id}
|
||||
# targeting.facebook.app-secret=${FACEBOOK_APP_SECRET:dummy-app-secret}
|
||||
# targeting.facebook.oauth-redirect-uri=${FACEBOOK_REDIRECT_URI:http://localhost:8080/api/v1/targeting/facebook/callback}
|
||||
# targeting.facebook.graph-api-version=v19.0
|
||||
# targeting.facebook.rate-limit-retry-ms=5000
|
||||
# targeting.facebook.max-retries=3
|
||||
#
|
||||
# targeting.tiktok.app-id=${TIKTOK_APP_ID:dummy-app-id}
|
||||
# targeting.tiktok.app-secret=${TIKTOK_APP_SECRET:dummy-app-secret}
|
||||
# targeting.tiktok.oauth-redirect-uri=${TIKTOK_REDIRECT_URI:http://localhost:8080/api/v1/targeting/tiktok/callback}
|
||||
# targeting.tiktok.base-url=https://business-api.tiktok.com/open_api/v1.3
|
||||
|
||||
targeting.ai.audience-model=gpt-4o
|
||||
targeting.ai.max-audience-tokens=2500
|
||||
|
||||
Reference in New Issue
Block a user