| name | http-api-cloudbase |
| description | CloudBase official HTTP API client guide. This skill should be used when backends, scripts, or non-SDK clients must call CloudBase platform APIs over raw HTTP instead of using a platform SDK or MCP management tool. |
| version | 2.20.1 |
| alwaysApply | false |
Standalone Install Note
If this environment only installed the current skill, start from the CloudBase main entry and use the published cloudbase/references/... paths for sibling skills.
- CloudBase main entry:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md
- Current skill raw source:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/http-api/SKILL.md
Keep local references/... paths for files that ship with the current skill directory. When this file points to a sibling skill such as auth-tool or web-development, use the standalone fallback URL shown next to that reference.
Activation Contract
Use this first when
- The request comes from Android, iOS, Flutter, React Native, non-Node backends, or admin scripts that must call official CloudBase APIs via raw HTTP.
- The task is to consume CloudBase platform endpoints, not to build a new HTTP service on CloudBase.
Read before writing code if
- The platform does not support a CloudBase SDK, or the user explicitly asks for HTTP API integration.
- The user says "HTTP API" but it is unclear whether they mean official CloudBase endpoints or their own business API.
Then also read
- Auth configuration ->
../auth-tool/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-tool/SKILL.md)
- MySQL MCP management ->
../relational-database-tool/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/relational-database-tool/SKILL.md)
- Your own HTTP service on CloudBase ->
../cloud-functions/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloud-functions/SKILL.md) or ../cloudrun-development/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudrun-development/SKILL.md)
Do NOT use for
- CloudBase Web SDK flows, mini program SDK flows, or MCP-driven management tasks.
- Building your own HTTP service or REST API on CloudBase.
Common mistakes / gotchas
- Treating Web SDK examples as valid for native Apps.
- Guessing endpoints without reading OpenAPI definitions.
- Confusing official CloudBase HTTP APIs with your own function or CloudRun endpoint.
- Mixing raw HTTP API integration with MCP management logic.
Minimal checklist
When to use this skill
Use this skill whenever you need to call CloudBase platform features 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
- Direct database operations via ๅ
ณ็ณปๅๆฐๆฎๅบ RESTful API (MySQL/PostgreSQL)
- Cloud function invocation via HTTP
- Any scenario where SDKs are not available or not preferred
Do not use this skill for:
- Frontend Web apps using
@cloudbase/js-sdk (use CloudBase Web skills)
- Node.js code using
@cloudbase/node-sdk (use CloudBase Node skills)
- Authentication flows (use CloudBase Auth HTTP API skill for auth-specific endpoints)
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 ID
- Authentication method (AccessToken, API Key, or Publishable Key)
- Confirm which CloudBase feature is needed (database, functions, storage, etc.).
- For user authentication: If no specific method is requested, always default to Phone SMS Verification - it's the most user-friendly and secure option for Chinese users.
-
Determine the base URL
- Use the correct domain based on region (domestic vs. international).
- Default is domestic Shanghai region.
-
Set up authentication
- Choose appropriate authentication method based on use case.
- Add
Authorization: Bearer <token> header to requests.
-
Reference OpenAPI Swagger documentation
- MUST use
searchKnowledgeBase tool to get OpenAPI specifications
- Use the tool with
mode=openapi and specify the apiName:
mysqldb - ๅ
ณ็ณปๅๆฐๆฎๅบ RESTful API (MySQL/PostgreSQL)
nosql - NoSQL RESTful API (ๆๆกฃๅๆฐๆฎๅบ)
functions - Cloud Functions API
auth - Authentication API
cloudrun - CloudRun API
storage - Storage API
ai_model - AI ๅคงๆจกๅๆฅๅ
ฅ API
- Example:
searchKnowledgeBase({ mode: "openapi", apiName: "mysqldb" })
- Parse the returned YAML content to understand exact endpoint paths, parameters, request/response schemas
- Never invent endpoints or parameters - always reference the swagger documentation
Overview
CloudBase HTTP API is a set of interfaces for accessing CloudBase platform features via HTTP protocol, supporting database, user authentication, cloud functions, cloud hosting, cloud storage, AI, and more.
OpenAPI Swagger Documentation
โ ๏ธ IMPORTANT: Always use searchKnowledgeBase tool to get OpenAPI Swagger specifications
Before implementing any HTTP API calls, you should:
-
Use searchKnowledgeBase tool to get OpenAPI documentation:
searchKnowledgeBase({ mode: "openapi", apiName: "<api-name>" })
-
Available API names:
mysqldb - ๅ
ณ็ณปๅๆฐๆฎๅบ RESTful API (MySQL/PostgreSQL)
nosql - NoSQL RESTful API (ๆๆกฃๅๆฐๆฎๅบ)
functions - Cloud Functions API
auth - Authentication API
cloudrun - CloudRun API
storage - Storage API
ai_model - AI ๅคงๆจกๅๆฅๅ
ฅ API
-
Parse and use the swagger documentation:
- Extract exact endpoint paths and HTTP methods
- Understand required and optional parameters
- Review request/response schemas
- Check authentication requirements
- Verify error response formats
-
Never invent API endpoints or parameters - always base your implementation on the official swagger documentation.
Prerequisites
Before starting, ensure you have:
- CloudBase environment created and activated
- Authentication credentials (AccessToken, API Key, or Publishable Key)
Authentication and Authorization
CloudBase HTTP API requires authentication. Choose the appropriate method based on your use case:
AccessToken Authentication
Applicable environments: Client/Server
User permissions: Logged-in user permissions
How to get: Use searchKnowledgeBase({ mode: "openapi", apiName: "auth" }) to get the Authentication API specification
API Key
Applicable environments: Server
User permissions: Administrator permissions
โ ๏ธ Warning: Tokens are critical credentials for identity authentication. Keep them secure. API Key must NOT be used in client-side code.
Publishable Key
Applicable environments: Client/Server
User permissions: Anonymous user permissions
๐ก Note: Can be exposed in browsers, used for requesting publicly accessible resources, effectively reducing MAU.
API Endpoint URLs
CloudBase HTTP API uses unified domain names for API calls. The domain varies based on the environment's region.
Domestic Regions
For environments in domestic regions like Shanghai (ap-shanghai), use:
https://{your-env}.api.tcloudbasegateway.com
Replace {your-env} with the actual environment ID. For example, if environment ID is cloud1-abc:
https://cloud1-abc.api.tcloudbasegateway.com
International Regions
For environments in international regions like Singapore (ap-singapore), use:
https://{your-env}.api.intl.tcloudbasegateway.com
Replace {your-env} with the actual environment ID. For example, if environment ID is cloud1-abc:
https://cloud1-abc.api.intl.tcloudbasegateway.com
Using Authentication in Requests
Add the token to the request header:
Authorization: Bearer <access_token/apikey/publishable_key>
:::warning Note
When making actual calls, replace the entire part including angle brackets (< >) with your obtained key. For example, if the obtained key is eymykey, fill it as:
Authorization: Bearer eymykey
:::
Usage Examples
Cloud Function Invocation Example
curl -X POST "https://your-env-id.api.tcloudbasegateway.com/v1/functions/YOUR_FUNCTION_NAME" \
-H "Authorization: Bearer <access_token/apikey/publishable_key>" \
-H "Content-Type: application/json" \
-d '{"name": "ๅผ ไธ", "age": 25}'
For detailed API specifications, always download and reference the OpenAPI Swagger files mentioned above.
ๅ
ณ็ณปๅๆฐๆฎๅบ RESTful API (PostgREST ้ฃๆ ผ)
้็จไบ MySQL ๅ PostgreSQL๏ผไธค่
ๅๅบไบ PostgREST ้ฃๆ ผๆด้ฒ REST API๏ผ็ซฏ็นๆ ผๅผๅ่ฏทๆฑ่ฏญไนไธ่ดใ
ๆไพๅ
ณ็ณปๅๆฐๆฎๅบ๏ผMySQL / PostgreSQL๏ผ็ HTTP ๆไฝๆฅๅฃใ
Base URL Patterns
Support three domain access patterns:
https://{envId}.api.tcloudbasegateway.com/v1/rdb/rest/{table}
https://{envId}.api.tcloudbasegateway.com/v1/rdb/rest/{schema}/{table}
https://{envId}.api.tcloudbasegateway.com/v1/rdb/rest/{instance}/{schema}/{table}
Where:
envId is the environment ID
instance is the database instance identifier
schema is the database name
table is the table name
If using the system database, recommend pattern 1.
Request Headers
| Header | Parameter | Description | Example |
|---|
| Accept | application/json, application/vnd.pgrst.object+json | Control data return format | Accept: application/json |
| Content-Type | application/json, application/vnd.pgrst.object+json | Request content type | Content-Type: application/json |
| Prefer | Operation-dependent feature values | - return=representation Write operation, return data body and headers - return=minimal Write operation, return headers only (default) - count=exact Read operation, specify count - resolution=merge-duplicates Upsert operation, merge conflicts - resolution=ignore-duplicates Upsert operation, ignore conflicts | Prefer: return=representation |
| Authorization | Bearer <token> | Authentication token | Authorization: Bearer <access_token> |
Query Records
GET /v1/rdb/rest/{table}
Query Parameters:
select: Field selection, supports * or field list, supports join queries like class_id(grade,class_number)
limit: Limit return count
offset: Offset for pagination
order: Sort field, format field.asc or field.desc
Example:
curl -X GET 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course?select=name,position&name=like.%ๅผ ไธ%&title=eq.ๆ็ซ ๆ ้ข' \
-H "Authorization: Bearer <access_token>"
curl -X GET 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course?select=name,position&name=like.%%E5%BC%A0%E4%B8%89%&title=eq.%E6%96%87%E7%AB%A0%E6%A0%87%E9%A2%98' \
-H "Authorization: Bearer <access_token>"
Response Headers:
Content-Range: Data range, e.g., 0-9/100 (0=start, 9=end, 100=total)
Insert Records
POST /v1/rdb/rest/{table}
Request Body: JSON object or array of objects
๐ก Note about _openid: When a user is logged in (using AccessToken authentication), the _openid field is automatically populated by the server with the current user's identity. You do NOT need to manually set this field in INSERT operations - the server will fill it automatically based on the authenticated user's session.
Example:
curl -X POST 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course' \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"name": "ๆฐๅญฆ",
"position": 1
}'
Update Records
PATCH /v1/rdb/rest/{table}
Request Body: JSON object with fields to update
Example:
curl -X PATCH 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course?id=eq.1' \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"name": "้ซ็ญๆฐๅญฆ",
"position": 2
}'
โ ๏ธ Important: UPDATE requires a WHERE clause. Use query parameters like ?id=eq.1 to specify conditions.
Delete Records
DELETE /v1/rdb/rest/{table}
Example:
curl -X DELETE 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course?id=eq.1' \
-H "Authorization: Bearer <access_token>"
โ ๏ธ Important: DELETE requires a WHERE clause. Use query parameters to specify conditions.
Error Codes and HTTP Status Codes
| Error Code | HTTP Status | Description |
|---|
| INVALID_PARAM | 400 | Invalid request parameters |
| INVALID_REQUEST | 400 | Invalid request content: missing permission fields, SQL execution errors, etc. |
| INVALID_REQUEST | 406 | Does not meet single record return constraint |
| PERMISSION_DENIED | 401, 403 | Authentication failed: 401 for identity authentication failure, 403 for authorization failure |
| RESOURCE_NOT_FOUND | 404 | Database instance or table not found |
| SYS_ERR | 500 | Internal system error |
| OPERATION_FAILED | 503 | Failed to establish database connection |
| RESOURCE_UNAVAILABLE | 503 | Database unavailable due to certain reasons |
Response Format
-
All POST, PATCH, DELETE operations: Request header with Prefer: return=representation means there is a response body, without it means only response headers.
-
POST, PATCH, DELETE response bodies are usually JSON array type []. If request header specifies Accept: application/vnd.pgrst.object+json, it will return JSON object type {}.
-
If Accept: application/vnd.pgrst.object+json is specified but data quantity is greater than 1, an error will be returned.
URL Encoding
When making requests, please perform URL encoding. For example:
Original request:
curl -i -X GET 'https://{{host}}/v1/rdb/rest/course?select=name,position&name=like.%ๅผ ไธ%&title=eq.ๆ็ซ ๆ ้ข'
Encoded request:
curl -i -X GET 'https://{{host}}/v1/rdb/rest/course?select=name,position&name=like.%%E5%BC%A0%E4%B8%89%&title=eq.%E6%96%87%E7%AB%A0%E6%A0%87%E9%A2%98'
NoSQL RESTful API
NoSQL RESTful API ๆไพๆๆกฃๅๆฐๆฎๅบ๏ผNoSQL๏ผ็ HTTP ๆไฝๆฅๅฃ๏ผๆฏๆ้ๅ็ฎก็ใๆๆกฃ CRUDใ่ๅๆฅ่ฏขใไบๅกๆไฝๅๆฐๆฎๅบๅฝไปคใ
Base URL
https://{envId}.api.tcloudbasegateway.com/v1/database/instances/{instance}/databases/{database}/
| ๅๆฐ | ่ฏดๆ |
|---|
envId | ็ฏๅข ID |
instance | ๆฐๆฎๅบๅฎไพ ID๏ผ้ป่ฎคๅฎไพไฝฟ็จ (default) |
database | ๆฐๆฎๅบๅ็งฐ๏ผ้ป่ฎคๆฐๆฎๅบไฝฟ็จ (default) |
็คบไพ๏ผ
- ้ป่ฎคๅฎไพ + ้ป่ฎคๆฐๆฎๅบ๏ผ
/v1/database/instances/(default)/databases/(default)/
- ๆๅฎๅฎไพ + ้ป่ฎคๆฐๆฎๅบ๏ผ
/v1/database/instances/test_instance/databases/(default)/
่ฏทๆฑไธๅๅบๆ ผๅผ
- ่ฏทๆฑๆฏๆ Relaxed ๅ Strict EJSON ๆ ผๅผ
- ๅๅบๅไธบ Strict EJSON ๆ ผๅผ
- EJSON ๆฏๆ็็นๆฎ็ฑปๅ๏ผ
ObjectIdใDateใIntใLongใDecimal128ใBinaryใRegExp
้่ฏฏ็ ไธ HTTP ็ถๆ็
| ้่ฏฏ็ | HTTP ็ถๆ็ | ่ฏดๆ |
|---|
INVALID_PARAM | 400 | ๅๆฐ้่ฏฏ |
DATABASE_PERMISSION_DENIED | 401 | ๆ้ไธ่ถณ |
DATABASE_INVALID_OPERRATOR | 403 | ไธๆฏๆ็ๆไฝ |
DATABASE_COLLECTION_NOT_EXIST | 404 | ้ๅไธๅญๅจ |
DOCUMENT_NOT_FOUND | 404 | ๆๆกฃไธๅญๅจ |
DATABASE_COLLECTION_ALREADY_EXIST | 409 | ้ๅๅทฒๅญๅจ |
DATABASE_DUPLICATE_WRITE | 409 | ๅฏไธ็ดขๅผๅฒ็ช |
EXCEED_REQUEST_LIMIT | 422 | ่ฏทๆฑๆฌกๆฐ่ถ
้ |
EXCEED_CONCURRENT_REQUEST_LIMIT | 422 | ๅนถๅ่ฏทๆฑ่ถ
้ |
DATABASE_REQUEST_FAILED | 500 | ๆฐๆฎๅบ่ฏทๆฑๅคฑ่ดฅ |
SYS_ERR | 500 | ๅ
้จ้่ฏฏ |
DATABASE_TRANSACTION_CONFLICT | 503 | ไบๅกๅฒ็ช |
DATABASE_TRANSACTION_FAIL | 503 | ไบๅกๆง่กๅคฑ่ดฅ |
DATABASE_TIMEOUT | 504 | ๆฐๆฎๅบๆไฝ่ถ
ๆถ |
่ฏฆ็ป็ซฏ็นไฝฟ็จๅ่ฏทๆฑ็คบไพ๏ผ่ฏทๅ่ๅฎๆนๆๆกฃ๏ผhttps://docs.cloudbase.net/http-api/nosql/nosql-restful-api
AI ๅคงๆจกๅๆฅๅ
ฅ API
็ปไธ็ๅคงๆจกๅๆฅๅ
ฅ API๏ผๆฏๆ้่ฟ HTTP ่ฐ็จๅทฒ้
็ฝฎ็ AI ๅคงๆจกๅ๏ผๆฏๆ SSE ๆตๅผๅๅบ๏ผใ
่ฎค่ฏๆนๅผ
| ๆนๅผ | ่ฏดๆ |
|---|
Authorization: Bearer <token> | AccessToken ่ฎค่ฏ๏ผๆจ่๏ผ |
| TC3-HMAC-SHA256 ็ญพๅ | ่
พ่ฎฏไบ API v3 ็ญพๅๆนๅผ |
Authorization: <apikey> | APIKey ่ฎค่ฏ |
AccessToken ่ทๅๆนๅผ๏ผๅ่ Auth OpenAPI (searchKnowledgeBase({ mode: "openapi", apiName: "auth" }))
้่ฏฏ็
| ้่ฏฏ็ | ่ฏดๆ |
|---|
AI_MODEL_CONFIG_MISSING | ็ผบๅฐๆจกๅ API Key ๆ้
็ฝฎ |
AI_MODEL_PARAM_INVALID | ่พๅ
ฅๅๆฐๆ ๆ |
AI_MODEL_DISABLED | ๆจกๅๅทฒ็ฆ็จ๏ผ่ฏทๅจๆงๅถๅฐๆฃๆฅๆ็ญๅพ
็บฆ 2 ๅ้ |
AI_MODEL_NOT_SUPPORTED | ่ฏทๆฑๆจกๅไธๆฏๆๆๆชๅฏ็จ |
AI_MODEL_PARAM_REQUIRED | ็ผบๅฐๅฟ
้ๅๆฐ model |
AI_MODEL_NOT_FOUND | ๆๅฎ็ๆจกๅ็ปไธๅญๅจ |
EXCEED_CONCURRENT_REQUEST_LIMIT | ๅนถๅ่ฏทๆฑ่ถ
้๏ผ่ฏท็จๅ้่ฏๆ็ณ่ฏทๆด้ซ้
้ข |
EXCEED_TOKEN_QUOTA_LIMIT | ๆจกๅ Token ้
้ข่ถ
้๏ผ่ฏท่ดญไนฐ่ตๆบๆ่ฐๆดๆจกๅ็ป |
่ฏฆ็ป็ซฏ็นๅ่ฏทๆฑๆ ผๅผ๏ผ่ฏทๅ่ๅฎๆนๆๆกฃ๏ผhttps://docs.cloudbase.net/http-api/ai-model/ai-%E5%A4%A7%E6%A8%A1%E5%9E%8B%E6%8E%A5%E5%85%A5
ไปฅๅ OpenAPI ่ง่๏ผhttps://docs.cloudbase.net/openapi/ai_model.v1.openapi.yaml
Online Debugging Tool
CloudBase platform provides an online debugging tool where you can test API interfaces without writing code:
- Visit the API documentation page
- Find the debugging tool entry
- Fill in environment ID and request parameters
- Click send request to view response
API Documentation References
โ ๏ธ Always use searchKnowledgeBase tool to get OpenAPI Swagger specifications:
Use searchKnowledgeBase({ mode: "openapi", apiName: "<api-name>" }) with these API names:
auth - Authentication API
mysqldb - ๅ
ณ็ณปๅๆฐๆฎๅบ RESTful API (MySQL/PostgreSQL)
nosql - NoSQL RESTful API (ๆๆกฃๅๆฐๆฎๅบ)
functions - Cloud Functions API
cloudrun - CloudRun API
storage - Storage API
ai_model - AI ๅคงๆจกๅๆฅๅ
ฅ API
How to use the OpenAPI documentation:
- Call
searchKnowledgeBase tool with the appropriate apiName
- Parse the returned YAML content to extract:
- Endpoint paths (e.g.,
/v1/rdb/rest/{table})
- HTTP methods (GET, POST, PATCH, DELETE)
- Path parameters, query parameters, request body schemas
- Response schemas and status codes
- Authentication requirements
- Use the extracted information to construct accurate API calls
- Never assume endpoint structure - always verify against swagger documentation
Common Patterns
Reusable Shell Variables
env="your-env-id"
token="your-access-token-or-api-key"
base="https://${env}.api.tcloudbasegateway.com"
Common Request Pattern
curl -X GET "${base}/v1/rdb/rest/table_name" \
-H "Authorization: Bearer ${token}" \
-H "Content-Type: application/json"
Error Handling
Always check HTTP status codes and error response format:
{
"code": "ERROR_CODE",
"message": "Error message details",
"requestId": "request-unique-id"
}
Common Authentication Flows
๐ IMPORTANT: Default Authentication Method
When no specific signup/signin method is specified by the user, ALWAYS use Phone SMS Verification as the default and recommended method. It is:
- โ
The most user-friendly for Chinese users
- โ
No password to remember
- โ
Works for both new users (registration) and existing users (login)
- โ
Most secure with OTP verification
- โ
Supported by default in CloudBase
Phone Number Verification Code Login (Native Apps) โญ RECOMMENDED
This is the preferred authentication flow for native mobile apps (iOS/Android/Flutter/React Native):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 1: Send Verification Code โ
โ POST /auth/v1/verification โ
โ Body: { "phone_number": "+86 13800138000", "target": "ANY" } โ
โ โ ๏ธ IMPORTANT: phone_number MUST include "+86 " prefix WITH SPACE โ
โ Response: { "verification_id": "xxx", "expires_in": 600 } โ
โ ๐ SAVE verification_id for next step! โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 2: Verify Code โ
โ POST /auth/v1/verification/verify โ
โ Body: { "verification_id": "<saved_id>", "verification_code": "123456" }โ
โ Response: { "verification_token": "xxx" } โ
โ ๐ SAVE verification_token for login! โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 3: Sign In with Token โ
โ POST /auth/v1/signin โ
โ Body: { "verification_token": "<saved_token>" } โ
โ Response: { "access_token": "xxx", "refresh_token": "xxx" } โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๏ธ Critical Notes:
- Phone number format: MUST be
"+86 13800138000" with space after country code
- Save
verification_id: Returned from Step 1, required for Step 2
- Save
verification_token: Returned from Step 2, required for Step 3
Best Practices
- Always use URL encoding for query parameters containing special characters
- Include WHERE clauses for UPDATE and DELETE operations
- Use appropriate Prefer headers to control response format
- Handle errors gracefully by checking status codes and error responses
- Keep tokens secure - never expose API Keys in client-side code
- Use appropriate authentication method based on your use case:
- AccessToken for user-specific operations
- API Key for server-side admin operations
- Publishable Key for public access (note: anonymous login is disabled by default for new environments)
- Phone number format: Always use international format with space:
"+86 13800138000"
- Verification flow: Save
verification_id from send step, use it in verify step