{"id":7825,"date":"2026-08-20T21:51:26","date_gmt":"2026-08-20T13:51:26","guid":{"rendered":"https:\/\/www.babel.cc\/blog\/?p=7825"},"modified":"2026-08-20T21:51:26","modified_gmt":"2026-08-20T13:51:26","slug":"%e5%b7%b4%e5%88%ab%e9%b8%9f%e7%9a%84-api-%e4%ba%8c%e6%ac%a1%e5%bc%80%e5%8f%91%e6%80%8e%e4%b9%88%e8%90%bd%e5%9c%b0%ef%bc%9a5-%e4%b8%aa%e7%9c%9f%e5%ae%9e%e5%8f%af%e7%94%a8%e7%9a%84-sdk-%e7%ad%be","status":"publish","type":"post","link":"https:\/\/www.babel.cc\/blog\/?p=7825","title":{"rendered":"\u5df4\u522b\u9e1f\u7684 API \u4e8c\u6b21\u5f00\u53d1\u600e\u4e48\u843d\u5730\uff1a5 \u4e2a\u771f\u5b9e\u53ef\u7528\u7684 SDK \u7b7e\u540d\u4e0e OAuth \u96c6\u6210\u5b9e\u6218"},"content":{"rendered":"<p>\u5df4\u522b\u9e1f\u7684 API \u4e8c\u6b21\u5f00\u53d1\u600e\u4e48\u843d\u5730\uff1a5 \u4e2a\u771f\u5b9e\u53ef\u7528\u7684 SDK \u7b7e\u540d\u4e0e OAuth \u96c6\u6210\u5b9e\u6218<\/p>\n<p>\u5df4\u522b\u9e1f\u4f5c\u4e3a\u4f01\u4e1a\u4e91\u76d8\u5e73\u53f0\uff0c\u63d0\u4f9b 900+ \u5f00\u653e API\uff0c\u8986\u76d6\u6587\u4ef6\u4e0a\u4f20\u4e0b\u8f7d\u3001\u6743\u9650\u7ba1\u7406\u3001\u5ba1\u6279\u6d41\u7a0b\u3001\u7528\u6237\u7ec4\u7ec7\u7ba1\u7406\u7b49\u4f01\u4e1a\u6838\u5fc3\u573a\u666f\u3002\u79c1\u6709\u5316\u90e8\u7f72\u7684\u4f01\u4e1a\u7f51\u76d8\u5ba2\u6237\u53ef\u57fa\u4e8e\u8fd9\u5957 API \u5b8c\u6210\u6df1\u5ea6\u4e1a\u52a1\u5b9a\u5236\uff0c\u6bd4\u5982\u5bf9\u63a5\u81ea\u6709 ERP\u3001\u642d\u5efa\u884c\u4e1a\u4e13\u5c5e\u5de5\u4f5c\u6d41\u3001\u6216\u5c06\u5df4\u522b\u9e1f\u4f5c\u4e3a\u4f01\u4e1a\u5185\u5bb9\u5e95\u5ea7\u5d4c\u5165\u5185\u90e8\u7cfb\u7edf\u3002\u672c\u6587\u805a\u7126 SDK \u7b7e\u540d\u751f\u6210\u4e0e OAuth \u96c6\u6210\u4e24\u4e2a\u6700\u9ad8\u9891\u7684\u63a5\u5165\u969c\u788d\uff0c\u63d0\u4f9b 5 \u4e2a\u53ef\u76f4\u63a5\u590d\u7528\u7684\u5b9e\u6218\u4ee3\u7801\u6bb5\uff0c\u8986\u76d6 Python \u548c JavaScript \u4e24\u79cd\u4e3b\u6d41\u8bed\u8a00\u3002<\/p>\n<h2>1. \u7b7e\u540d\u673a\u5236\u539f\u7406<\/h2>\n<p>\u5df4\u522b\u9e1f API \u91c7\u7528 HMAC-SHA256 \u7b7e\u540d\u9a8c\u8bc1\uff0c\u6bcf\u4e00\u6b21\u8bf7\u6c42\u5fc5\u987b\u5728 HTTP Header \u4e2d\u643a\u5e26 Signature\u3001AccessKey\u3001Timestamp \u4e09\u4e2a\u5b57\u6bb5\u3002\u670d\u52a1\u7aef\u4f1a\u6821\u9a8c\u7b7e\u540d\u6709\u6548\u6027\u548c\u65f6\u95f4\u6233\u65b0\u9c9c\u5ea6\uff08\u9ed8\u8ba4 5 \u5206\u949f\u7a97\u53e3\uff09\uff0c\u9632\u6b62\u8bf7\u6c42\u88ab\u622a\u83b7\u540e\u91cd\u653e\u3002<\/p>\n<p>\u7b7e\u540d\u7b97\u6cd5\u7684\u8f93\u5165\u4e3a\u300c\u5f85\u7b7e\u540d\u5b57\u7b26\u4e32\u300d\uff0c\u7531 HTTP Method\u3001\u8bf7\u6c42\u8def\u5f84\u3001RFC 3339 \u683c\u5f0f\u65f6\u95f4\u6233\u3001\u8bf7\u6c42\u4f53 SHA256 \u54c8\u5e0c\u503c\uff0c\u56db\u9879\u6309\u6362\u884c\u7b26\u62fc\u63a5\u800c\u6210\u3002\u516c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>\u5f85\u7b7e\u540d\u5b57\u7b26\u4e32 = Method + &quot;\\n&quot; + Path + &quot;\\n&quot; + Timestamp + &quot;\\n&quot; + SHA256(RequestBody)<\/p>\n<p>\u7b7e\u540d\u7684\u751f\u6210\u65b9\u5f0f\uff1aHMAC-SHA256(\u5f85\u7b7e\u540d\u5b57\u7b26\u4e32, SecretKey)\uff0c\u7ed3\u679c\u518d\u505a Base64 \u7f16\u7801\u3002\u4ee5\u4e0b\u4e24\u8282\u5206\u522b\u7ed9\u51fa Python \u548c Node.js \u7684\u5b8c\u6574\u5b9e\u73b0\u3002<\/p>\n<h2>2. Python \u5b9e\u73b0\u7b7e\u540d\u751f\u6210<\/h2>\n<pre><code class=\"language-python\">import hashlib\r\nimport hmac\r\nimport base64\r\nfrom datetime import datetime, timezone\r\n\r\ndef build_signature(method: str, path: str, timestamp: str, body: bytes, access_key: str, secret_key: str) -&gt; str:\r\n    body_hash = hashlib.sha256(body).hexdigest()\r\n    string_to_sign = f&quot;{method}\\n{path}\\n{timestamp}\\n{body_hash}&quot;\r\n    signing_key = hmac.new(\r\n        secret_key.encode(&quot;utf-8&quot;),\r\n        string_to_sign.encode(&quot;utf-8&quot;),\r\n        hashlib.sha256\r\n    ).digest()\r\n    signature = base64.b64encode(signing_key).decode(&quot;utf-8&quot;)\r\n    return signature\r\n\r\ndef make_signed_headers(method: str, path: str, body: bytes, access_key: str, secret_key: str) -&gt; dict:\r\n    # \u65f6\u95f4\u6233\u4f7f\u7528 UTC\uff0c\u907f\u514d\u65f6\u533a\u6b67\u4e49\r\n    timestamp = datetime.now(timezone.utc).strftime(&quot;%Y-%m-%dT%H:%M:%SZ&quot;)\r\n    signature = build_signature(method, path, timestamp, body, access_key, secret_key)\r\n    return {\r\n        &quot;X-Babelbird-AccessKey&quot;: access_key,\r\n        &quot;X-Babelbird-Timestamp&quot;: timestamp,\r\n        &quot;X-Babelbird-Signature&quot;: signature,\r\n        &quot;Content-Type&quot;: &quot;application\/json&quot;,\r\n    }\r\n<\/code><\/pre>\n<p>\u8c03\u7528\u793a\u4f8b\u2014\u2014\u4e0a\u4f20\u6587\u4ef6\u524d\u83b7\u53d6\u9884\u7b7e\u540d\u5730\u5740\uff1a<\/p>\n<pre><code class=\"language-python\">import requests, json\r\n\r\nACCESS_KEY = &quot;your_access_key_id&quot;\r\nSECRET_KEY = &quot;your_secret_key&quot;\r\nBASE_URL   = &quot;https:\/\/your-babelbird-host.com\/api\/v1&quot;\r\n\r\ndef get_upload_url(file_name: str, file_size: int):\r\n    path = &quot;\/storage\/upload-url&quot;\r\n    body = json.dumps({&quot;file_name&quot;: file_name, &quot;file_size&quot;: file_size}).encode()\r\n    headers = make_signed_headers(&quot;POST&quot;, path, body, ACCESS_KEY, SECRET_KEY)\r\n    resp = requests.post(BASE_URL + path, headers=headers, data=body)\r\n    resp.raise_for_status()\r\n    return resp.json()[&quot;data&quot;][&quot;upload_url&quot;]\r\n<\/code><\/pre>\n<p>\u5173\u952e\u6ce8\u610f\u70b9\uff1abody \u4e3a\u7a7a\u5b57\u8282\u4e32\u65f6 SHA256 \u54c8\u5e0c\u5fc5\u987b\u53c2\u4e0e\u7b7e\u540d\u8ba1\u7b97\uff0c\u7b49\u4ef7\u4e8e <code>hashlib.sha256(b&quot;&quot;).hexdigest()<\/code> \u7684\u7ed3\u679c\u3002\u79c1\u6709\u5316\u90e8\u7f72\u82e5\u542f\u7528\u4e86\u53cc\u5411 TLS\uff0c\u7b7e\u540d\u4ecd\u8d70\u6807\u51c6\u6d41\u7a0b\uff0c\u4f46\u9700\u5728 requests.Session \u4e2d\u52a0\u8f7d\u670d\u52a1\u7aef\u8bc1\u4e66\u3002<\/p>\n<h2>3. Node.js \/ TypeScript \u5b9e\u73b0\u7b7e\u540d\u751f\u6210<\/h2>\n<pre><code class=\"language-typescript\">import { createHmac, createHash } from &quot;crypto&quot;;\r\n\r\ninterface SignedHeaders {\r\n  &quot;X-Babelbird-AccessKey&quot;: string;\r\n  &quot;X-Babelbird-Timestamp&quot;: string;\r\n  &quot;X-Babelbird-Signature&quot;: string;\r\n  &quot;Content-Type&quot;: string;\r\n}\r\n\r\nfunction buildSignature(\r\n  method: string,\r\n  path: string,\r\n  timestamp: string,\r\n  body: Buffer,\r\n  accessKey: string,\r\n  secretKey: string\r\n): string {\r\n  const bodyHash = createHash(&quot;sha256&quot;).update(body).digest(&quot;hex&quot;);\r\n  const stringToSign = `${method}\\n${path}\\n${timestamp}\\n${bodyHash}`;\r\n  const signingKey = createHmac(&quot;sha256&quot;, secretKey)\r\n    .update(stringToSign)\r\n    .digest();\r\n  return signingKey.toString(&quot;base64&quot;);\r\n}\r\n\r\nfunction makeSignedHeaders(\r\n  method: string,\r\n  path: string,\r\n  body: Buffer,\r\n  accessKey: string,\r\n  secretKey: string\r\n): SignedHeaders {\r\n  const timestamp = new Date().toISOString().replace(\/\\.\\d{3}Z$\/, &quot;Z&quot;);\r\n  const signature = buildSignature(method, path, timestamp, body, accessKey, secretKey);\r\n  return {\r\n    &quot;X-Babelbird-AccessKey&quot;: accessKey,\r\n    &quot;X-Babelbird-Timestamp&quot;: timestamp,\r\n    &quot;X-Babelbird-Signature&quot;: signature,\r\n    &quot;Content-Type&quot;: &quot;application\/json&quot;,\r\n  };\r\n}\r\n<\/code><\/pre>\n<p>\u5728 Next.js \u6216 Express \u9879\u76ee\u4e2d\uff0c\u53ef\u5c06 <code>makeSignedHeaders<\/code> \u5c01\u88c5\u4e3a\u4e00\u4e2a Axios \u62e6\u622a\u5668\uff0c\u907f\u514d\u6bcf\u6b21\u8bf7\u6c42\u624b\u52a8\u8c03\u7528\uff1a<\/p>\n<pre><code class=\"language-typescript\">import axios from &quot;axios&quot;;\r\n\r\nconst apiClient = axios.create({ baseURL: process.env.BABELBIRD_API_BASE });\r\n\r\napiClient.interceptors.request.use((config) =&gt; {\r\n  const body = Buffer.from(JSON.stringify(config.data) || &quot;&quot;, &quot;utf-8&quot;);\r\n  const signed = makeSignedHeaders(\r\n    config.method!.toUpperCase(),\r\n    config.url!,\r\n    body,\r\n    process.env.BABELBIRD_ACCESS_KEY!,\r\n    process.env.BABELBIRD_SECRET_KEY!\r\n  );\r\n  config.headers.set(signed);\r\n  return config;\r\n});\r\n<\/code><\/pre>\n<h2>4. OAuth 2.0 \u6388\u6743\u7801\u6a21\u5f0f\u63a5\u5165<\/h2>\n<p>\u5bf9\u4e8e\u9700\u8981\u4ee5\u7528\u6237\u8eab\u4efd\u8bbf\u95ee\u5df4\u522b\u9e1f\u7684\u573a\u666f\uff08\u5982\u5185\u90e8\u95e8\u6237\u4ee3\u66ff\u7528\u6237\u767b\u5f55\uff09\uff0c\u63a8\u8350\u4f7f\u7528 OAuth 2.0 \u6388\u6743\u7801\u6a21\u5f0f\u3002\u6388\u6743\u6d41\u7a0b\u5206\u56db\u6b65\uff1a\u5f15\u5bfc\u7528\u6237\u8bbf\u95ee\u6388\u6743\u9875 \u2192 \u7528\u6237\u6388\u6743\u540e\u56de\u8c03\u5e26 code \u2192 \u540e\u7aef\u7528 code \u6362 token \u2192 \u7528 token \u8c03\u7528\u7528\u6237\u7ea7 API\u3002<\/p>\n<p>\u6388\u6743\u9875 URL \u62fc\u63a5\u89c4\u5219\uff1a<\/p>\n<pre><code>GET https:\/\/{host}\/oauth\/authorize\r\n  ?client_id={client_id}\r\n  &amp;redirect_uri={encoded_callback_url}\r\n  &amp;response_type=code\r\n  &amp;scope=file:read file:write\r\n  &amp;state={random_csrf_token}\r\n<\/code><\/pre>\n<p>\u6388\u6743\u7801\u6709\u6548\u671f 10 \u5206\u949f\uff0c\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u3002\u7528\u6388\u6743\u7801\u6362\u53d6\u8bbf\u95ee\u4ee4\u724c\uff1a<\/p>\n<pre><code class=\"language-python\">def exchange_code_for_token(code: str) -&gt; dict:\r\n    path = &quot;\/oauth\/token&quot;\r\n    payload = {\r\n        &quot;grant_type&quot;: &quot;authorization_code&quot;,\r\n        &quot;code&quot;: code,\r\n        &quot;client_id&quot;: CLIENT_ID,\r\n        &quot;client_secret&quot;: CLIENT_SECRET,\r\n        &quot;redirect_uri&quot;: CALLBACK_URL,\r\n    }\r\n    body = json.dumps(payload).encode()\r\n    headers = make_signed_headers(&quot;POST&quot;, path, body, ACCESS_KEY, SECRET_KEY)\r\n    resp = requests.post(BASE_URL + path, headers=headers, data=body)\r\n    resp.raise_for_status()\r\n    return resp.json()[&quot;data&quot;]\r\n<\/code><\/pre>\n<p>\u8fd4\u56de\u7684 token \u7ed3\u6784\u5305\u542b access_token\uff08\u6709\u6548\u671f 2 \u5c0f\u65f6\uff09\u3001refresh_token\uff08\u6709\u6548\u671f 30 \u5929\uff09\u3002\u5efa\u8bae\u914d\u5408\u5b9a\u65f6\u4efb\u52a1\u5728 token \u8fc7\u671f\u524d\u81ea\u52a8\u5237\u65b0\uff1a<\/p>\n<pre><code class=\"language-python\">def refresh_access_token(refresh_token: str) -&gt; dict:\r\n    path = &quot;\/oauth\/token&quot;\r\n    payload = {\r\n        &quot;grant_type&quot;: &quot;refresh_token&quot;,\r\n        &quot;refresh_token&quot;: refresh_token,\r\n        &quot;client_id&quot;: CLIENT_ID,\r\n        &quot;client_secret&quot;: CLIENT_SECRET,\r\n    }\r\n    body = json.dumps(payload).encode()\r\n    headers = make_signed_headers(&quot;POST&quot;, path, body, ACCESS_KEY, SECRET_KEY)\r\n    resp = requests.post(BASE_URL + path, headers=headers, data=body)\r\n    resp.raise_for_status()\r\n    return resp.json()[&quot;data&quot;]\r\n<\/code><\/pre>\n<h2>5. Webhook \u56de\u8c03\u5b89\u5168\u9a8c\u8bc1<\/h2>\n<p>\u6587\u4ef6\u72b6\u6001\u53d8\u66f4\u3001\u5ba1\u6279\u901a\u8fc7\u7b49\u4e8b\u4ef6\u53ef\u901a\u8fc7 Webhook \u5b9e\u65f6\u63a8\u9001\u5230\u4f01\u4e1a\u670d\u52a1\u7aef\u3002\u5df4\u522b\u9e1f\u5728\u6bcf\u4e2a Webhook \u8bf7\u6c42\u4e2d\u9644\u52a0 X-Babelbird-Signature-256 Header\uff0c\u503c\u4e3a\u4e8b\u4ef6\u8d1f\u8f7d\u7684 HMAC-SHA256 \u7b7e\u540d\uff0c\u7b7e\u540d\u5bc6\u94a5\u5373 Webhook \u6ce8\u518c\u65f6\u8fd4\u56de\u7684 secret\u3002\u9a8c\u8bc1\u903b\u8f91\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">def verify_webhook(payload_bytes: bytes, signature_header: str, webhook_secret: str) -&gt; bool:\r\n    expected = hmac.new(\r\n        webhook_secret.encode(&quot;utf-8&quot;),\r\n        payload_bytes,\r\n        hashlib.sha256\r\n    ).hexdigest()\r\n    return hmac.compare_digest(f&quot;sha256={expected}&quot;, signature_header)\r\n<\/code><\/pre>\n<p>\u6ce8\u610f\uff1a<code>hmac.compare_digest<\/code> \u80fd\u9632\u6b62\u65f6\u5e8f\u653b\u51fb\uff0c\u4e0d\u8981\u7528 <code>==<\/code> \u76f4\u63a5\u6bd4\u8f83\u3002\u82e5 Webhook \u6295\u9012\u5931\u8d25\uff0c\u5df4\u522b\u9e1f\u9ed8\u8ba4\u6307\u6570\u9000\u907f\u91cd\u8bd5 5 \u6b21\uff0cHTTP \u72b6\u6001\u7801 2xx \u89c6\u4e3a\u9001\u8fbe\u3002\u5efa\u8bae Webhook \u5904\u7406\u5165\u53e3\u8bbe\u8ba1\u4e3a\u975e\u963b\u585e\uff1a\u63a5\u6536\u5230\u8bf7\u6c42\u540e\u7acb\u5373\u8fd4\u56de 200\uff0c\u518d\u5f02\u6b65\u5206\u53d1\u4e8b\u4ef6\u5230\u4e1a\u52a1\u903b\u8f91\uff0c\u907f\u514d\u8d85\u65f6\u5bfc\u81f4\u91cd\u590d\u6295\u9012\u3002<\/p>\n<h2>6. \u79c1\u6709\u5316\u90e8\u7f72\u7279\u6b8a\u914d\u7f6e<\/h2>\n<p>\u79c1\u6709\u5316\u73af\u5883\u4e0b\uff0cAPI \u57fa\u7840\u5730\u5740\u7531\u5404\u4f01\u4e1a\u81ea\u5b9a\u57df\u540d\u51b3\u5b9a\uff0c\u4e0d\u518d\u662f\u5df4\u522b\u9e1f\u516c\u7f51\u5730\u5740\u3002\u90e8\u5206\u79c1\u6709\u5316\u5ba2\u6237\u542f\u7528\u7684\u662f\u81ea\u7b7e\u540d CA \u8bc1\u4e66\uff0cPython \u4fa7\u9700\u8981\u5728 requests \u8bf7\u6c42\u524d\u6ce8\u5165\u8bc1\u4e66\uff1a<\/p>\n<pre><code class=\"language-python\">import urllib3\r\nurllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)\r\n\r\nsession = requests.Session()\r\nsession.verify = &quot;\/path\/to\/internal-ca.crt&quot;  # \u6216\u8005\u8bbe\u4e3a False \u8df3\u8fc7\u9a8c\u8bc1\uff08\u6d4b\u8bd5\u73af\u5883\uff09\r\n<\/code><\/pre>\n<p>Node.js \u4fa7\u5728 Axios \u4e2d\u914d\u7f6e\uff1a<\/p>\n<pre><code class=\"language-typescript\">process.env.NODE_TLS_REJECT_UNAUTHORIZED = &quot;0&quot;; \/\/ \u4ec5\u6d4b\u8bd5\u73af\u5883\r\n<\/code><\/pre>\n<p>\u751f\u4ea7\u79c1\u6709\u5316\u5efa\u8bae\u7684\u505a\u6cd5\u662f\u7531\u8fd0\u7ef4\u5c06\u4f01\u4e1a CA \u8bc1\u4e66\u6dfb\u52a0\u5230\u7cfb\u7edf\u4fe1\u4efb\u5e93\uff0c\u4ee3\u7801\u5c42\u65e0\u9700\u4efb\u4f55\u4fee\u6539\uff0c\u7b7e\u540d\u903b\u8f91\u4fdd\u6301\u4e0e\u516c\u6709\u4e91\u4e00\u81f4\u3002<\/p>\n<h2>7. \u5e38\u89c1\u9519\u8bef\u901f\u67e5<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u9519\u8bef\u7801<\/th>\n<th>\u542b\u4e49<\/th>\n<th>\u6392\u67e5\u65b9\u5411<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>401 Unauthorized<\/td>\n<td>\u7b7e\u540d\u6821\u9a8c\u5931\u8d25<\/td>\n<td>\u68c0\u67e5 AccessKey\/SecretKey \u662f\u5426\u5339\u914d\uff1b\u786e\u8ba4\u65f6\u95f4\u6233\u65f6\u533a\u4e3a UTC<\/td>\n<\/tr>\n<tr>\n<td>403 Signature Expired<\/td>\n<td>\u65f6\u95f4\u6233\u8d85\u51fa 5 \u5206\u949f\u7a97\u53e3<\/td>\n<td>\u786e\u8ba4\u670d\u52a1\u5668\u65f6\u95f4\u540c\u6b65\uff08NTP\uff09\uff1b\u7b7e\u540d\u8ba1\u7b97\u65f6\u4e0d\u5e94\u542b\u6beb\u79d2<\/td>\n<\/tr>\n<tr>\n<td>400 Invalid Grant<\/td>\n<td>\u6388\u6743\u7801\u5df2\u7528\u6216\u8fc7\u671f<\/td>\n<td>\u6388\u6743\u7801\u6709\u6548\u671f 10 \u5206\u949f\uff0c\u53ea\u80fd\u4e00\u6b21\u6027\u5151\u6362<\/td>\n<\/tr>\n<tr>\n<td>429 Rate Limited<\/td>\n<td>\u8bf7\u6c42\u9891\u7387\u8d85\u9650<\/td>\n<td>\u63a7\u5236\u5e76\u53d1\uff1b\u79c1\u6709\u5316\u90e8\u7f72\u53ef\u8054\u7cfb\u7ba1\u7406\u5458\u8c03\u9ad8\u9608\u503c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u7ed3\u8bed<\/h2>\n<p>\u672c\u6587\u8986\u76d6\u4e86\u5df4\u522b\u9e1f API \u63a5\u5165\u4e2d\u6700\u6838\u5fc3\u7684\u4e24\u4e2a\u73af\u8282\u2014\u2014\u7b7e\u540d\u751f\u6210\u548c OAuth \u96c6\u6210\uff0c\u5e76\u9644\u5e26\u4e86 Webhook \u9a8c\u7b7e\u3001\u79c1\u6709\u5316\u8bc1\u4e66\u914d\u7f6e\u548c\u5e38\u89c1\u9519\u8bef\u901f\u67e5\u3002900+ API \u7684\u5b8c\u6574\u80fd\u529b\u8fdc\u4e0d\u6b62\u8fd9\u4e9b\uff0c\u914d\u5408\u5df4\u522b\u9e1f\u7ec6\u7c92\u5ea6\u6743\u9650\u4f53\u7cfb\u548c\u79c1\u6709\u5316\u90e8\u7f72\u80fd\u529b\uff0c\u4f01\u4e1a\u53ef\u4ee5\u5c06\u6587\u4ef6\u7ba1\u7406\u6df1\u5ea6\u5d4c\u5165\u81ea\u8eab\u4e1a\u52a1\u6d41\uff0c\u5b9e\u73b0\u771f\u6b63\u7684\u300cAI \u5de5\u4f5c\u6d41\u57fa\u7840\u8bbe\u65bd\u300d\u3002\u6280\u672f\u56e2\u961f\u53ea\u9700\u8981\u5173\u6ce8\u7b7e\u540d\u903b\u8f91\u7684\u5b9e\u73b0\u8d28\u91cf\u548c token \u7684\u5b89\u5168\u5b58\u50a8\uff0c\u5269\u4f59\u7684\u5de5\u4f5c\u6d41\u7f16\u6392\u90fd\u53ef\u4ee5\u57fa\u4e8e API \u81ea\u7531\u6784\u5efa\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5df4\u522b\u9e1f\u7684 API \u4e8c\u6b21\u5f00\u53d1\u600e\u4e48\u843d\u5730\uff1a5 \u4e2a\u771f\u5b9e\u53ef\u7528\u7684 SDK&#8230; <a class=\"read-more\" href=\"https:\/\/www.babel.cc\/blog\/?p=7825\">[Continue Reading]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-7825","post","type-post","status-publish","format-standard","hentry","category-12","no-post-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7825"}],"version-history":[{"count":1,"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7825\/revisions"}],"predecessor-version":[{"id":7826,"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7825\/revisions\/7826"}],"wp:attachment":[{"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.babel.cc\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}