Notice: Constant CONFIG_FILE already defined in /var/www/bizailast/marketing/generate-social-ads.php on line 13
╔════════════════════════════════════════════════════════════╗
║ Social Media Ad Generator - Gemini 2.5 Flash ║
║ Biz AI Last - 24/7 Customer Engagement Solution ║
╚════════════════════════════════════════════════════════════╝
🔐 Getting OAuth access token...
✓ Access token obtained
✓ Using Vertex AI with Gemini 2.5 Flash
✓ Max tokens: 65000 (intelligent management)
Starting content generation...
----------------------------------------------------------------------
LINKEDIN:
----------------------------------------------------------------------
Generating content for linkedin (how-to)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"service": "aiplatform.googleapis.com",
"containerInfo": "balmy-parser-429022-r2",
"consumer": "projects/balmy-parser-429022-r2",
"serviceTitle": "Agent Platform API"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for linkedin - how-to
Generating content for linkedin (comparison)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"serviceTitle": "Agent Platform API",
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"service": "aiplatform.googleapis.com",
"consumer": "projects/balmy-parser-429022-r2",
"containerInfo": "balmy-parser-429022-r2"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for linkedin - comparison
Generating content for linkedin (question)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"service": "aiplatform.googleapis.com",
"containerInfo": "balmy-parser-429022-r2",
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"consumer": "projects/balmy-parser-429022-r2",
"serviceTitle": "Agent Platform API"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for linkedin - question
Generating content for linkedin (behind-scenes)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"service": "aiplatform.googleapis.com",
"consumer": "projects/balmy-parser-429022-r2",
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"serviceTitle": "Agent Platform API",
"containerInfo": "balmy-parser-429022-r2"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for linkedin - behind-scenes
TWITTER:
----------------------------------------------------------------------
Generating content for twitter (how-to)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"service": "aiplatform.googleapis.com",
"consumer": "projects/balmy-parser-429022-r2",
"containerInfo": "balmy-parser-429022-r2",
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"serviceTitle": "Agent Platform API"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for twitter - how-to
Generating content for twitter (comparison)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"containerInfo": "balmy-parser-429022-r2",
"consumer": "projects/balmy-parser-429022-r2",
"serviceTitle": "Agent Platform API",
"service": "aiplatform.googleapis.com"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for twitter - comparison
Generating content for twitter (question)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"service": "aiplatform.googleapis.com",
"containerInfo": "balmy-parser-429022-r2",
"consumer": "projects/balmy-parser-429022-r2",
"serviceTitle": "Agent Platform API"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for twitter - question
Generating content for twitter (behind-scenes)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"serviceTitle": "Agent Platform API",
"consumer": "projects/balmy-parser-429022-r2",
"service": "aiplatform.googleapis.com",
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"containerInfo": "balmy-parser-429022-r2"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for twitter - behind-scenes
FACEBOOK:
----------------------------------------------------------------------
Generating content for facebook (how-to)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"serviceTitle": "Agent Platform API",
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"service": "aiplatform.googleapis.com",
"consumer": "projects/balmy-parser-429022-r2",
"containerInfo": "balmy-parser-429022-r2"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for facebook - how-to
Generating content for facebook (comparison)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"serviceTitle": "Agent Platform API",
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"service": "aiplatform.googleapis.com",
"consumer": "projects/balmy-parser-429022-r2",
"containerInfo": "balmy-parser-429022-r2"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for facebook - comparison
Generating content for facebook (question)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"serviceTitle": "Agent Platform API",
"service": "aiplatform.googleapis.com",
"consumer": "projects/balmy-parser-429022-r2",
"containerInfo": "balmy-parser-429022-r2",
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for facebook - question
Generating content for facebook (behind-scenes)...
API Error (HTTP 403): {
"error": {
"code": 403,
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"containerInfo": "balmy-parser-429022-r2",
"activationUrl": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2",
"service": "aiplatform.googleapis.com",
"consumer": "projects/balmy-parser-429022-r2",
"serviceTitle": "Agent Platform API"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "Agent Platform API has not been used in project balmy-parser-429022-r2 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/aiplatform.googleapis.com/overview?project=balmy-parser-429022-r2"
}
]
}
]
}
}
✗ Failed to generate content for facebook - behind-scenes
======================================================================
Generation complete!
✓ Success: 0 files created
✗ Failed: 12
📁 Files saved in: /var/www/bizailast/media/texts/
======================================================================
╔════════════════════════════════════════════════════════════╗
║ Batch Social Media Generator - Gemini 2.5 Flash ║
║ Using Vertex AI with OAuth + 65000 max tokens ║
╚════════════════════════════════════════════════════════════╝
🔐 Verifying OAuth access...
✓ OAuth access verified
This tool generates multiple sets of social media content.
Select platforms (separate with commas):
1. LinkedIn
2. Twitter
3. Facebook
Example: 1,2,3 (for all platforms)
✓ Selected: linkedin, twitter, facebook
Select content types (separate with commas):
1. Promotional
2. Educational
3. Testimonial
4. Statistic
5. Question
6. Announcement
Example: 1,2,3,4 (for first four types)
✓ Selected: promotional, educational, testimonial, statistic
📊 Total posts to generate: 12
⏱️ Estimated time: 24 seconds
❌ Cancelled.