Gmail API Settings
Gmail API uses OAuth2 for secure authentication. You'll need to create a project in Google Cloud Console and download credentials.
Step 1: Create Google Cloud Project
- Visit Google Cloud Console
- Create a new project or select an existing one
- Enable Gmail API:
- Go to "APIs & Services" → "Enabled APIs & services"
- Click "+ ENABLE APIS AND SERVICES"
- Search for "Gmail API" and enable it
Step 2: Create OAuth 2.0 Credentials
- Go to "APIs & Services" → "Credentials"
- Click "Create Credentials" → "OAuth client ID"
- Configure consent screen if prompted (choose "External" user type)
- Application type: Web application
- Name: Any name (e.g., "CS2 Server Manager")
- Authorized redirect URIs: Add the following URL:
- Click "Create" and download the credentials JSON file
Step 3: Configure in System Settings
- Open the downloaded
credentials.json file
- Copy all contents and paste into "Gmail API Credentials JSON" below
- Click "Upload Credentials"
- Click "Authorize Gmail API" and complete Google authorization
- Save settings
Important Notes
- First-time use: Google may show "This app isn't verified" - click "Advanced" → "Go to [app name] (unsafe)" to continue
- The redirect URI must exactly match your server's address
- Access tokens refresh automatically - no manual intervention needed
第一步:创建 Google Cloud 项目
- 访问 Google Cloud Console
- 创建新项目或选择现有项目
- 启用 Gmail API:
- 转到"API 和服务" → "启用的 API 和服务"
- 点击"+ 启用 API 和服务"
- 搜索"Gmail API"并启用
第二步:创建 OAuth 2.0 凭据
- 转到"API 和服务" → "凭据"
- 点击"创建凭据" → "OAuth 客户端 ID"
- 如提示配置同意屏幕,选择"外部"用户类型
- 应用类型:Web 应用
- 名称:任意名称(如"CS2 Server Manager")
- 已获授权的重定向 URI:添加以下 URL:
- 点击"创建"并下载凭据 JSON 文件
第三步:在系统设置中配置
- 打开下载的
credentials.json 文件
- 复制全部内容并粘贴到下方"Gmail API Credentials JSON"
- 点击"上传凭据"
- 点击"授权 Gmail API"并完成 Google 授权
- 保存设置
重要提示
- 首次使用:Google 可能显示"此应用未经验证"警告,点击"高级" → "转到 [应用名称](不安全)"继续
- 重定向 URI 必须完全匹配您服务器的实际访问地址
- 访问令牌会自动刷新,无需手动操作
Paste the contents of credentials.json from Google Cloud Console