# Add Service Account to Vercel - Step by Step
## โ
Your Service Account JSON (Single-Line Format)
The complete JSON is in `service-account-oneline.txt`. Here's what you need to do:
## ๐ Steps to Add to Vercel
1. **Go to Vercel Dashboard:**
- Visit: https://vercel.com/dashboard
- Select your project: `linkedin-mcp-mocha` (or your project name)
2. **Navigate to Environment Variables:**
- Click on your project
- Go to **Settings** โ **Environment Variables**
3. **Add New Environment Variable:**
- Click **"Add New"** button
- **Key:** `GOOGLE_APPLICATION_CREDENTIALS_JSON`
- **Value:** Copy the entire contents from `service-account-oneline.txt`
- Open the file: `cat service-account-oneline.txt`
- Copy the entire JSON string (it's all on one line)
- **Environment:** Select all three:
- โ
Production
- โ
Preview
- โ
Development
- Click **"Save"**
4. **Verify Existing Variables:**
Make sure these are still set:
- `GCP_PROJECT_ID` = `amgn-app`
- `GCP_LOCATION` = `us-central1` (or `global`)
- `ANTHROPIC_MODEL_ID` = `claude-sonnet-4-5`
- `DATABASE_URL` = (your Neon DB URL)
5. **Remove or Leave Empty:**
- `VERTEX_AI_API_KEY` - You can delete this or leave it empty (service account JSON will be used instead)
6. **Redeploy:**
- After saving, Vercel will automatically redeploy
- Or manually trigger: Go to **Deployments** โ Click **"Redeploy"** on latest deployment
## ๐งช Test After Deployment
Wait 1-2 minutes for deployment, then test:
```bash
curl -X POST "https://linkedin-mcp-mocha.vercel.app/api/products/analyze" \
-H "Content-Type: application/json" \
-d '{
"api_key": "b01a98cddade43cac435ef18e6bf0ffe9937dd8fd2da7910b2b9c4b11284d471",
"name": "AmroPilot",
"website_url": "https://amropilot.com",
"description": "AmroPilot is an AI-powered content creation platform that generates human-like text. It helps content creators, marketers, and SEO professionals create engaging articles that rank, convert, and dominate search results.",
"value_proposition": "Transform your content strategy with AI that understands search intent, creates engaging articles, and optimizes for maximum visibility. Generate content that bypasses AI detection and ranks on Google.",
"target_audience": "Content creators, SEO professionals, digital marketers, content marketing agencies, bloggers, online businesses"
}' | python -m json.tool
```
If you get a successful response with product analysis, it's working! โ
## ๐ Security Note
- The service account JSON contains sensitive credentials
- Never commit it to Git (it's already in `.gitignore`)
- Only store it in Vercel environment variables
- The service account has `Vertex AI User` role - minimal permissions needed
## ๐ Quick Copy Command
To get the JSON value to paste:
```bash
cat service-account-oneline.txt
```
Copy the entire output and paste it as the value in Vercel.