auth-http-api-cloudbase
БесплатноБез исполняемых скриптовНе проверенUse when you need to implement CloudBase Auth v2 over raw HTTP endpoints (login/signup, tokens, user operations) from backends or scripts that are not using…
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
When to use this skill
Use this skill whenever you need to call CloudBase Auth via raw HTTP APIs, for example:
- Non-Node backends (Go, Python, Java, PHP, etc.)
- Integration tests or admin scripts that use curl or language HTTP clients
- Gateways or proxies that sit in front of CloudBase and manage tokens themselves
Do not use this skill for:
- Frontend Web login with
@cloudbase/[email protected](use CloudBase Web Auth skill) - Node.js code that uses
@cloudbase/node-sdk(use CloudBase Node Auth skill) - Non-auth CloudBase features (database, storage, etc.)
How to use this skill (for a coding agent)
Clarify the scenario
- Confirm this code will call HTTP endpoints directly (not SDKs).
- Ask for:
env– CloudBase environment IDclientId/clientSecret– HTTP auth client credentials
- Confirm whether the flow is login/sign-up, anonymous access, token management, or user operations.
Set common variables once
- Use a shared set of shell variables for base URL and headers, then reuse them across scenarios.
Pick a scenario from this file
- For login / sign-up, start with Scenarios 1–3.
- For token lifecycle, use Scenarios 4–6.
- For user info and profile changes, use Scenario 7.
Never invent endpoints or fields
- Treat the URLs and JSON shapes in this file as canonical.
- If you are unsure, consult the HTTP API docs under
/source-of-truth/auth/http-api/登录认证接口.info.mdxand the specific*.api.mdxfiles.
HTTP API basics
Base URL pattern
https://${env}.ap-shanghai.tcb-api.tencentcloudapi.com/auth/v1/...
Common headers
x-device-id– device or client identifierx-request-id– unique request ID for tracingAuthorization–Bearer <access_token>for user endpoints- Or HTTP basic auth (
-u clientId:clientSecret) for client-credential style endpoints
Reusable shell variables
env="your-env-id"
deviceID="backend-service-1"
requestID="$(uuidgen || echo manual-request-id)"
clientId="your-client-id"
clientSecret="your-client-secret"
base="https://${env}.ap-shanghai.tcb-api.tencentcloudapi.com/auth/v1"
Core concepts (HTTP perspective)
- CloudBase Auth uses JWT access tokens plus refresh tokens.
- HTTP login/sign-up endpoints usually return both
access_tokenandrefresh_token. - Most user-management endpoints require
Authorization: Bearer ${accessToken}. - Verification flows (SMS/email) use separate
verificationendpoints before sign-up.
Scenarios (flat list)
Scenario 1: Sign-in with username/password
curl "${base}/signin" \
-X POST \
-H "x-device-id: ${deviceID}" \
-H "x-request-id: ${requestID}" \
-u "${clientId}:${clientSecret}" \
--data-raw '{"username":"[email protected]","password":"your password"}'
- Use when the user already has a username (phone/email/username) and password.
- Response includes
access_token,refresh_token, and user info.
Scenario 2: SMS sign-up with verification code
- Send verification code
curl "${base}/verification" \
-X POST \
-H "x-device-id: ${deviceID}" \
-H "x-request-id: ${requestID}" \
-u "${clientId}:${clientSecret}" \
--data-raw '{"phone_number":"+86 13800000000"}'
- Verify code
curl "${base}/verification/verify" \
-X POST \
-H "x-device-id: ${deviceID}" \
-H "x-request-id: ${requestID}" \
-u "${clientId}:${clientSecret}" \
--data-raw '{"verification_code":"000000","verification_id":"<from previous step>"}'
- Sign up
curl "${base}/signup" \
-X POST \
-H "x-device-id: ${deviceID}" \
-H "x-request-id: ${requestID}" \
-u "${clientId}:${clientSecret}" \
--data-raw '{
"phone_number":"+86 13800000000",
"verification_code":"000000",
"verification_token":"<from verify>",
"name":"手机用户",
"password":"password",
"username":"username"
}'
- Use this pattern for SMS or email-based registration; adapt fields per docs.
Scenario 3: Anonymous login
curl "${base}/signin-anonymously" \
-X POST \
-H "x-device-id: ${deviceID}" \
-H "x-request-id: ${requestID}" \
-u "${clientId}:${clientSecret}" \
--data-raw '{}'
- Returns tokens for an anonymous user that you can later upgrade via sign-up.
Scenario 4: Exchange refresh token for new access token
curl "${base}/token" \
-X POST \
-H "x-device-id: ${deviceID}" \
-H "x-request-id: ${requestID}" \
-u "${clientId}:${clientSecret}" \
--data-raw '{"grant_type":"refresh_token","refresh_token":"<refresh_token>"}'
- Use when the frontend or another service sends you a refresh token and you need a fresh access token.
Scenario 5: Introspect and validate a token
curl "${base}/token/introspect?token=${accessToken}" \
-H "x-request-id: ${requestID}" \
-u "${clientId}:${clientSecret}"
- Use for backend validation of tokens before trusting them.
- Res
Установить auth-http-api-cloudbase в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл auth-http-api-cloudbase?
Use when you need to implement CloudBase Auth v2 over raw HTTP endpoints (login/signup, tokens, user operations) from backends or scripts that are not using the Web or Node SDKs.
Как установить скилл auth-http-api-cloudbase?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл auth-http-api-cloudbase запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic