← 返回
安全合规 Key 中文

Firebase

Firebase Management API integration with managed OAuth. Manage Firebase projects, web apps, Android apps, and iOS apps. Use this skill when users want to lis...
托管OAuth集成Firebase Management API,管理Firebase项目、Web、Android和iOS应用。用户需要列(list)时使用此技能。
byungkyu
安全合规 clawhub v1.0.1 2 版本 99716.2 Key: 需要
★ 0
Stars
📥 1,757
下载
💾 27
安装
2
版本
#latest

概述

Firebase

Access the Firebase Management API with managed OAuth authentication. Manage Firebase projects and apps (Web, Android, iOS) with full CRUD operations.

Quick Start

# List Firebase projects
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/firebase/v1beta1/projects')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Base URL

https://api.maton.ai/firebase/{native-api-path}

Maton proxies requests to firebase.googleapis.com and automatically injects your OAuth token.

Authentication

All requests require the Maton API key in the Authorization header:

Authorization: Bearer $MATON_API_KEY

Environment Variable: Set your API key as MATON_API_KEY:

export MATON_API_KEY="YOUR_API_KEY"

Getting Your API Key

  1. Sign in or create an account at maton.ai
  2. Go to maton.ai/settings
  3. Copy your API key

Connection Management

Manage your Firebase OAuth connections at https://api.maton.ai.

List Connections

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections?app=firebase&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Create Connection

python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'firebase'}).encode()
req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Get Connection

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Response:

{
  "connection": {
    "connection_id": "{connection_id}",
    "status": "ACTIVE",
    "creation_time": "2025-12-08T07:20:53.488460Z",
    "last_updated_time": "2026-01-31T20:03:32.593153Z",
    "url": "https://connect.maton.ai/?session_token=...",
    "app": "firebase",
    "metadata": {}
  }
}

Open the returned url in a browser to complete OAuth authorization.

Delete Connection

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Specifying Connection

If you have multiple Firebase connections, specify which one to use with the Maton-Connection header:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/firebase/v1beta1/projects')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '{connection_id}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

If you have multiple connections, always include this header to ensure requests go to the intended account.

Security & Permissions

  • Access is scoped to projects, web apps, sites, hosting channels, and releases within the connected Firebase account.
  • All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.

API Reference

Project Operations

List Projects

List all Firebase projects accessible to the authenticated user.

GET /firebase/v1beta1/projects

Response:

{
  "results": [
    {
      "projectId": "my-firebase-project",
      "projectNumber": "123456789",
      "displayName": "My Firebase Project",
      "name": "projects/my-firebase-project",
      "resources": {
        "hostingSite": "my-firebase-project"
      },
      "state": "ACTIVE",
      "etag": "1_bc06d94f-cf77-4689-be01-576702b23f6a"
    }
  ]
}

Get Project

GET /firebase/v1beta1/projects/{projectId}

Update Project

PATCH /firebase/v1beta1/projects/{projectId}?updateMask=displayName
Content-Type: application/json

{
  "displayName": "Updated Project Name"
}

List Available Projects

List Google Cloud projects that can have Firebase added.

GET /firebase/v1beta1/availableProjects

Add Firebase to Project

Add Firebase services to an existing Google Cloud project.

POST /firebase/v1beta1/projects/{projectId}:addFirebase
Content-Type: application/json

{}

This returns a long-running operation. Check the operation status with:

GET /firebase/v1beta1/operations/{operationId}

Get Admin SDK Config

GET /firebase/v1beta1/projects/{projectId}/adminSdkConfig

Web App Operations

List Web Apps

GET /firebase/v1beta1/projects/{projectId}/webApps

Get Web App

GET /firebase/v1beta1/projects/{projectId}/webApps/{appId}

Create Web App

POST /firebase/v1beta1/projects/{projectId}/webApps
Content-Type: application/json

{
  "displayName": "My Web App"
}

Update Web App

PATCH /firebase/v1beta1/projects/{projectId}/webApps/{appId}?updateMask=displayName
Content-Type: application/json

{
  "displayName": "Updated Web App Name"
}

Get Web App Config

GET /firebase/v1beta1/projects/{projectId}/webApps/{appId}/config

Response:

{
  "projectId": "my-firebase-project",
  "appId": "1:123456789:web:abc123",
  "apiKey": "AIzaSy...",
  "authDomain": "my-firebase-project.firebaseapp.com",
  "storageBucket": "my-firebase-project.firebasestorage.app",
  "messagingSenderId": "123456789",
  "measurementId": "G-XXXXXXXXXX",
  "projectNumber": "123456789"
}

Delete Web App

POST /firebase/v1beta1/projects/{projectId}/webApps/{appId}:remove
Content-Type: application/json

{
  "immediate": true
}

Undelete Web App

POST /firebase/v1beta1/projects/{projectId}/webApps/{appId}:undelete
Content-Type: application/json

{}

Android App Operations

List Android Apps

GET /firebase/v1beta1/projects/{projectId}/androidApps

Get Android App

GET /firebase/v1beta1/projects/{projectId}/androidApps/{appId}

Create Android App

POST /firebase/v1beta1/projects/{projectId}/androidApps
Content-Type: application/json

{
  "displayName": "My Android App",
  "packageName": "com.example.myapp"
}

Update Android App

PATCH /firebase/v1beta1/projects/{projectId}/androidApps/{appId}?updateMask=displayName
Content-Type: application/json

{
  "displayName": "Updated Android App Name"
}

Get Android App Config

Returns the google-services.json configuration.

GET /firebase/v1beta1/projects/{projectId}/androidApps/{appId}/config

Delete Android App

POST /firebase/v1beta1/projects/{projectId}/androidApps/{appId}:remove
Content-Type: application/json

{
  "immediate": true
}

List SHA Certificates

GET /firebase/v1beta1/projects/{projectId}/androidApps/{appId}/sha

Add SHA Certificate

POST /firebase/v1beta1/projects/{projectId}/androidApps/{appId}/sha
Content-Type: application/json

{
  "shaHash": "1234567890ABCDEF1234567890ABCDEF12345678",
  "certType": "SHA_1"
}

Delete SHA Certificate

DELETE /firebase/v1beta1/projects/{projectId}/androidApps/{appId}/sha/{shaId}

iOS App Operations

List iOS Apps

GET /firebase/v1beta1/projects/{projectId}/iosApps

Get iOS App

GET /firebase/v1beta1/projects/{projectId}/iosApps/{appId}

Create iOS App

POST /firebase/v1beta1/projects/{projectId}/iosApps
Content-Type: application/json

{
  "displayName": "My iOS App",
  "bundleId": "com.example.myapp"
}

Update iOS App

PATCH /firebase/v1beta1/projects/{projectId}/iosApps/{appId}?updateMask=displayName
Content-Type: application/json

{
  "displayName": "Updated iOS App Name"
}

Get iOS App Config

Returns the GoogleService-Info.plist configuration.

GET /firebase/v1beta1/projects/{projectId}/iosApps/{appId}/config

Delete iOS App

POST /firebase/v1beta1/projects/{projectId}/iosApps/{appId}:remove
Content-Type: application/json

{
  "immediate": true
}

Google Analytics Operations

Get Analytics Details

GET /firebase/v1beta1/projects/{projectId}/analyticsDetails

Add Google Analytics

POST /firebase/v1beta1/projects/{projectId}:addGoogleAnalytics
Content-Type: application/json

{
  "analyticsAccountId": "123456789"
}

Remove Google Analytics

POST /firebase/v1beta1/projects/{projectId}:removeAnalytics
Content-Type: application/json

{
  "analyticsPropertyId": "properties/123456789"
}

Available Locations

List Available Locations

GET /firebase/v1beta1/projects/{projectId}/availableLocations

Pagination

Use pageSize and pageToken for pagination:

GET /firebase/v1beta1/projects?pageSize=10&pageToken={nextPageToken}

Response includes nextPageToken when more results exist:

{
  "results": [...],
  "nextPageToken": "..."
}

Code Examples

JavaScript

const response = await fetch(
  'https://api.maton.ai/firebase/v1beta1/projects',
  {
    headers: {
      'Authorization': `Bearer ${process.env.MATON_API_KEY}`
    }
  }
);
const data = await response.json();

Python

import os
import requests

response = requests.get(
    'https://api.maton.ai/firebase/v1beta1/projects',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
)
data = response.json()

Create a Web App

import os
import requests

response = requests.post(
    'https://api.maton.ai/firebase/v1beta1/projects/my-project/webApps',
    headers={
        'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
        'Content-Type': 'application/json'
    },
    json={'displayName': 'My New Web App'}
)
data = response.json()

Notes

  • Project IDs are globally unique identifiers for Firebase projects
  • App IDs follow the format 1:PROJECT_NUMBER:PLATFORM:HASH
  • PATCH requests require an updateMask query parameter specifying which fields to update (e.g., ?updateMask=displayName)
  • Create operations are asynchronous and return an Operation object
  • Check operation status at /firebase/v1beta1/operations/{operationId}
  • Deleted apps can be restored within 30 days using the undelete endpoint
  • IMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing
  • IMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments

Error Handling

StatusMeaning
-----------------
400Missing Firebase connection
401Invalid or missing Maton API key
403Insufficient permissions for the requested operation
404Project or app not found
429Rate limited
4xx/5xxPassthrough error from Firebase API

Resources

版本历史

共 2 个版本

  • v1.0.1 当前
    2026-05-03 02:43 安全 安全
  • v1.0.0
    2026-03-29 01:12 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,699
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,210 📥 266,156
developer-tools

API Gateway

byungkyu
通过 Maton 管理的 API 路由连接外部服务;仅在用户指定目标应用、账户和任务后使用;以读取/列...
★ 392 📥 103,032