# Get Tokens for Remaining Tunnels

You need tokens for:
- **r630-01** (ID: `4481af8f-b24c-4cd3-bdd5-f562f4c97df4`)
- **r630-02** (ID: `0876f12b-64d7-4927-9ab3-94cb6cf48af9`)

## Option 1: Cloudflare Dashboard (Recommended)

1. Go to: **https://one.dash.cloudflare.com/**
2. Navigate: **Zero Trust** → **Networks** → **Tunnels**
3. For each tunnel (r630-01, r630-02):
   - Click on the tunnel name
   - Click **"Configure"** tab
   - Scroll to **"Local Management"** section
   - Look for **"Token"** or **"Quick Tunnel Token"**
   - Copy the token (base64-encoded string)

## Option 2: Try API (May Not Work)

The API endpoint for generating tokens may require special permissions:

```bash
cd /home/intlc/projects/proxmox
source .env

# For r630-01
curl -X POST "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/cfd_tunnel/4481af8f-b24c-4cd3-bdd5-f562f4c97df4/token" \
  -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
  -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
  -H "Content-Type: application/json" | jq -r '.result.token'

# For r630-02
curl -X POST "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/cfd_tunnel/0876f12b-64d7-4927-9ab3-94cb6cf48af9/token" \
  -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
  -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
  -H "Content-Type: application/json" | jq -r '.result.token'
```

**Note:** This API endpoint may not work for existing tunnels. The dashboard method is more reliable.

## Option 3: Use Credentials Files Instead

If tokens aren't available, you can use credentials files:

1. Download credentials from dashboard (same process as before)
2. Save as: `credentials-r630-01.json` and `credentials-r630-02.json`
3. Run: `./scripts/setup-credentials-auto.sh`

## Once You Have Tokens

Run the installation script:

```bash
cd /home/intlc/projects/proxmox/scripts/cloudflare-tunnels

# You already have ml110 token, so use it again or skip if already installed
./scripts/install-all-tunnels.sh \
  "eyJhIjoiNTJhZDU3YTcxNjcxYzVmYzAwOWVkZjA3NDQ2NTgxOTYiLCJ0IjoiY2NkNzE1MGEtOTg4MS00YjhjLWExMDUtOWI0ZWFkNmU2OWEyIiwicyI6IkZtems1ZDdUWDR0OW03Q0huVU9DYTYyTFdiQVFPZkZKa2duRHhQdExkZldKNGVvTHgyckw5K2szVCs5N0lFTFFoNGdHdHZLbzNacGZpNmI4TkdxdUlnPT0ifQ==" \
  "<r630-01-token>" \
  "<r630-02-token>"
```

Or install individually:

```bash
# For r630-01
sudo cloudflared service install <r630-01-token>

# For r630-02  
sudo cloudflared service install <r630-02-token>
```

