# API Key Project Analysis

**Last Updated:** 2026-01-19

## Test Results

All Google API keys found in the codebase have been tested to determine their GCP project associations.

### Tested API Keys

| Key Name | Key Preview | Project Number | Status | Notes |
|----------|------------|----------------|--------|-------|
| **Default Maps Fallback** | `AIzaSyAcmDVIEYDtmeXj...` | `842128635996` | ✗ NOT ENABLED | Currently active key |
| **ShiftOps Report Maps Embed** | `AIzaSyCRvXi0j95yiC5V...` | `842128635996` | ✗ NOT ENABLED | Used in shiftops-report.php |
| **PageSpeed Insights Fallback** | `AIzaSyDfFAr5k1NOb8u_...` | `474512788435` | ✗ NOT ENABLED | Different project |

## Important: Project Number vs Project ID

**Project Number** (`842128635996`) and **Project ID** (`ordio-256916`) are **different identifiers**:

- **Project Number**: Numeric identifier (e.g., `842128635996`)
- **Project ID**: Alphanumeric identifier (e.g., `ordio-256916`)

A single project has both a project number and a project ID. They refer to the same project but are used in different contexts.

## Verification Needed

To verify if project number `842128635996` corresponds to project ID `ordio-256916`:

### Method 1: Check in Google Cloud Console

1. **Navigate to project settings:**
   - Go to: https://console.cloud.google.com/iam-admin/settings?project=ordio-256916
   - Or: IAM & Admin → Settings → Project Settings

2. **Check Project Number:**
   - Look for "Project number" field
   - Compare with: `842128635996`

3. **If they match:**
   - Project `ordio-256916` = Project number `842128635996`
   - Enable Vision API in project `ordio-256916`
   - All current API keys belong to the correct project

4. **If they don't match:**
   - Need to find/create API keys from project `ordio-256916`
   - Or use a different project for Vision API

### Method 2: Check API Credentials

1. **Navigate to credentials:**
   - Go to: https://console.cloud.google.com/apis/credentials?project=ordio-256916

2. **Check existing API keys:**
   - Look for keys that match the ones in our codebase
   - Check which project they belong to

3. **If keys exist in `ordio-256916`:**
   - Use those keys instead
   - Update configuration to use keys from `ordio-256916`

## Current Situation

**Active API Key:** `AIzaSyAcmDVIEYDtmeXjKfIsqYxbNy2FFsluCdo`  
**Belongs to Project Number:** `842128635996`  
**Project ID (to verify):** `ordio-256916` (needs verification)

## Next Steps

1. **Verify Project Association:**
   - Check if project number `842128635996` = project ID `ordio-256916`
   - Use Method 1 or Method 2 above

2. **If Project Matches:**
   - Enable Vision API in project `ordio-256916`
   - Check API key restrictions
   - Verify billing

3. **If Project Doesn't Match:**
   - Find API keys from project `ordio-256916`
   - Or create new API key in project `ordio-256916`
   - Update configuration to use new key

## Finding Keys from ordio-256916

If you need to find API keys that belong to `ordio-256916`:

1. **Go to API Credentials:**
   - https://console.cloud.google.com/apis/credentials?project=ordio-256916

2. **List all API keys:**
   - Look for keys that might be used by ShiftOps
   - Check key names/descriptions

3. **Test keys:**
   ```bash
   php v2/scripts/test-specific-api-key.php YOUR_KEY_HERE
   ```

4. **Update configuration:**
   - Set `GOOGLE_MAPS_API_KEY` environment variable
   - Or define `GOOGLE_MAPS_API_KEY` constant
   - Vision API will automatically use the same key

## Quick Verification Script

Run this to test a specific key:

```bash
php v2/scripts/test-specific-api-key.php YOUR_API_KEY
```

This will show:
- HTTP status
- Project number
- Enablement status
- Direct links to enable Vision API
