[{"data":1,"prerenderedAt":1058},["ShallowReactive",2],{"navigation_docs":3,"-guide-personal-access-tokens":500,"-guide-personal-access-tokens-surround":1053},[4,41,56,102],{"title":5,"icon":6,"path":7,"stem":8,"children":9},"内容发布","i-lucide-file-pen-line","\u002Fpublishing","0.publishing",[10,13,17,21,25,29,33,37],{"title":11,"path":7,"stem":12},"内容发布与审核","0.publishing\u002Findex",{"title":14,"path":15,"stem":16},"资源定义与收录范围","\u002Fpublishing\u002Fresource-definition","0.publishing\u002F0.resource-definition",{"title":18,"path":19,"stem":20},"帖子发布规范","\u002Fpublishing\u002Fposts","0.publishing\u002F1.posts",{"title":22,"path":23,"stem":24},"资源发布规范","\u002Fpublishing\u002Fresources","0.publishing\u002F2.resources",{"title":26,"path":27,"stem":28},"命名、署名与转载","\u002Fpublishing\u002Fnaming-and-attribution","0.publishing\u002F3.naming-and-attribution",{"title":30,"path":31,"stem":32},"资源审核要求","\u002Fpublishing\u002Fresource-review-requirements","0.publishing\u002F4.resource-review-requirements",{"title":34,"path":35,"stem":36},"审核与处置规范","\u002Fpublishing\u002Fmoderation","0.publishing\u002F5.moderation",{"title":38,"path":39,"stem":40},"举报、版权投诉与复核","\u002Fpublishing\u002Freports-and-appeals","0.publishing\u002F6.reports-and-appeals",{"title":42,"icon":43,"path":44,"stem":45,"children":46,"page":55},"参与贡献","i-lucide-hand-helping","\u002Fcontributing","1.contributing",[47,51],{"title":48,"path":49,"stem":50},"为 NexusMC 做贡献","\u002Fcontributing\u002Fgetting-started","1.contributing\u002F1.getting-started",{"title":52,"path":53,"stem":54},"NexusMC 开源项目","\u002Fcontributing\u002Fopen-source","1.contributing\u002F2.open-source",false,{"title":57,"icon":58,"path":59,"stem":60,"children":61,"page":55},"接入指南","i-lucide-book-open","\u002Fguide","1.guide",[62,66,70,74,78,82,86,90,94,98],{"title":63,"path":64,"stem":65},"开始接入","\u002Fguide\u002Fgetting-started","1.guide\u002F1.getting-started",{"title":67,"path":68,"stem":69},"个人令牌","\u002Fguide\u002Fpersonal-access-tokens","1.guide\u002F2.personal-access-tokens",{"title":71,"path":72,"stem":73},"开放平台 OAuth","\u002Fguide\u002Foauth","1.guide\u002F3.oauth",{"title":75,"path":76,"stem":77},"分页与错误","\u002Fguide\u002Fpagination-and-errors","1.guide\u002F4.pagination-and-errors",{"title":79,"path":80,"stem":81},"发布记录与联合筛选","\u002Fguide\u002Freleases-and-filters","1.guide\u002F5.releases-and-filters",{"title":83,"path":84,"stem":85},"资源更新与 Webhook","\u002Fguide\u002Fresource-updates-and-webhooks","1.guide\u002F6.resource-updates-and-webhooks",{"title":87,"path":88,"stem":89},"公共 API v1","\u002Fguide\u002Fpublic-api-v1","1.guide\u002F7.public-api-v1",{"title":91,"path":92,"stem":93},"机器人账号接入","\u002Fguide\u002Fbot-accounts","1.guide\u002F8.bot-accounts",{"title":95,"path":96,"stem":97},"机器人事件与回复","\u002Fguide\u002Fbot-events","1.guide\u002F9.bot-events",{"title":99,"path":100,"stem":101},"内容订阅","\u002Fguide\u002Fcontent-subscriptions","1.guide\u002F9.content-subscriptions",{"title":103,"icon":104,"path":105,"stem":106,"children":107},"API 参考","i-lucide-braces","\u002Fapi","2.api",[108,110,225,356,388,426,483],{"title":103,"path":105,"stem":109},"2.api\u002Findex",{"title":111,"icon":112,"path":113,"stem":114,"children":115},"公开内容","i-lucide-globe","\u002Fapi\u002Fpublic","2.api\u002F1.public\u002Findex",[116,118,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220],{"title":117,"path":113,"stem":114},"概览",{"title":119,"path":120,"stem":121,"badge":122},"随机浏览公开资源","\u002Fapi\u002Fpublic\u002Fbrowse-resources","2.api\u002F1.public\u002Fbrowse-resources",{"label":123,"color":124},"GET","success",{"title":126,"path":127,"stem":128,"badge":129},"检查多资源构建兼容性","\u002Fapi\u002Fpublic\u002Fcheck-compatibility","2.api\u002F1.public\u002Fcheck-compatibility",{"label":123,"color":124},{"title":131,"path":132,"stem":133,"badge":134},"查找资源名称","\u002Fapi\u002Fpublic\u002Ffind-resource-names","2.api\u002F1.public\u002Ffind-resource-names",{"label":123,"color":124},{"title":136,"path":137,"stem":138,"badge":139},"获取首页内容","\u002Fapi\u002Fpublic\u002Fget-home","2.api\u002F1.public\u002Fget-home",{"label":123,"color":124},{"title":141,"path":142,"stem":143,"badge":144},"读取公开组织详情","\u002Fapi\u002Fpublic\u002Fget-organization","2.api\u002F1.public\u002Fget-organization",{"label":123,"color":124},{"title":146,"path":147,"stem":148,"badge":149},"获取帖子及递归回复","\u002Fapi\u002Fpublic\u002Fget-post","2.api\u002F1.public\u002Fget-post",{"label":123,"color":124},{"title":151,"path":152,"stem":153,"badge":154},"获取资源详情及匹配发布","\u002Fapi\u002Fpublic\u002Fget-resource","2.api\u002F1.public\u002Fget-resource",{"label":123,"color":124},{"title":156,"path":157,"stem":158,"badge":159},"获取提到资源的帖子","\u002Fapi\u002Fpublic\u002Fget-resource-mentions","2.api\u002F1.public\u002Fget-resource-mentions",{"label":123,"color":124},{"title":161,"path":162,"stem":163,"badge":164},"获取标签聚合页","\u002Fapi\u002Fpublic\u002Fget-tag","2.api\u002F1.public\u002Fget-tag",{"label":123,"color":124},{"title":166,"path":167,"stem":168,"badge":169},"列出内容区块","\u002Fapi\u002Fpublic\u002Flist-blocks","2.api\u002F1.public\u002Flist-blocks",{"label":123,"color":124},{"title":171,"path":172,"stem":173,"badge":174},"列出能力定义","\u002Fapi\u002Fpublic\u002Flist-capabilities","2.api\u002F1.public\u002Flist-capabilities",{"label":123,"color":124},{"title":176,"path":177,"stem":178,"badge":179},"列出资源缺口","\u002Fapi\u002Fpublic\u002Flist-gaps","2.api\u002F1.public\u002Flist-gaps",{"label":123,"color":124},{"title":181,"path":182,"stem":183,"badge":184},"列出公开组织","\u002Fapi\u002Fpublic\u002Flist-organizations","2.api\u002F1.public\u002Flist-organizations",{"label":123,"color":124},{"title":186,"path":187,"stem":188,"badge":189},"筛选公开帖子","\u002Fapi\u002Fpublic\u002Flist-posts","2.api\u002F1.public\u002Flist-posts",{"label":123,"color":124},{"title":191,"path":192,"stem":193,"badge":194},"筛选公开资源","\u002Fapi\u002Fpublic\u002Flist-resources","2.api\u002F1.public\u002Flist-resources",{"label":123,"color":124},{"title":196,"path":197,"stem":198,"badge":199},"查找开放标签","\u002Fapi\u002Fpublic\u002Flist-tags","2.api\u002F1.public\u002Flist-tags",{"label":123,"color":124},{"title":201,"path":202,"stem":203,"badge":204},"继续读取帖子的直接回复","\u002Fapi\u002Fpublic\u002Fpost-replies","2.api\u002F1.public\u002Fpost-replies",{"label":123,"color":124},{"title":206,"path":207,"stem":208,"badge":209},"继续读取资源发布","\u002Fapi\u002Fpublic\u002Fresource-releases","2.api\u002F1.public\u002Fresource-releases",{"label":123,"color":124},{"title":211,"path":212,"stem":213,"badge":214},"查询当前兼容更新构建","\u002Fapi\u002Fpublic\u002Fresource-updates","2.api\u002F1.public\u002Fresource-updates",{"label":123,"color":124},{"title":216,"path":217,"stem":218,"badge":219},"搜索公开内容","\u002Fapi\u002Fpublic\u002Fsearch-content","2.api\u002F1.public\u002Fsearch-content",{"label":123,"color":124},{"title":221,"path":222,"stem":223,"badge":224},"获取公开内容建议","\u002Fapi\u002Fpublic\u002Fsuggest-content","2.api\u002F1.public\u002Fsuggest-content",{"label":123,"color":124},{"title":226,"icon":227,"path":228,"stem":229,"children":230},"个人 API","i-lucide-key-round","\u002Fapi\u002Fpersonal","2.api\u002F2.personal\u002Findex",[231,232,239,246,251,256,261,268,273,278,283,288,292,297,301,305,310,314,318,322,326,330,335,340,346,351],{"title":117,"path":228,"stem":229},{"title":233,"path":234,"stem":235,"badge":236},"修改 Issue 状态","\u002Fapi\u002Fpersonal\u002Fchange-post-state","2.api\u002F2.personal\u002Fchange-post-state",{"label":237,"color":238},"PUT","warning",{"title":240,"path":241,"stem":242,"badge":243},"创建组织","\u002Fapi\u002Fpersonal\u002Fcreate-organization","2.api\u002F2.personal\u002Fcreate-organization",{"label":244,"color":245},"POST","info",{"title":247,"path":248,"stem":249,"badge":250},"创建帖子","\u002Fapi\u002Fpersonal\u002Fcreate-post","2.api\u002F2.personal\u002Fcreate-post",{"label":244,"color":245},{"title":252,"path":253,"stem":254,"badge":255},"创建联合兼容发布记录","\u002Fapi\u002Fpersonal\u002Fcreate-release","2.api\u002F2.personal\u002Fcreate-release",{"label":244,"color":245},{"title":257,"path":258,"stem":259,"badge":260},"创建资源","\u002Fapi\u002Fpersonal\u002Fcreate-resource","2.api\u002F2.personal\u002Fcreate-resource",{"label":244,"color":245},{"title":262,"path":263,"stem":264,"badge":265},"删除本人帖子","\u002Fapi\u002Fpersonal\u002Fdelete-post","2.api\u002F2.personal\u002Fdelete-post",{"label":266,"color":267},"DELETE","error",{"title":269,"path":270,"stem":271,"badge":272},"删除本人维护的资源","\u002Fapi\u002Fpersonal\u002Fdelete-resource","2.api\u002F2.personal\u002Fdelete-resource",{"label":266,"color":267},{"title":274,"path":275,"stem":276,"badge":277},"读取本人展示资料","\u002Fapi\u002Fpersonal\u002Fget-me","2.api\u002F2.personal\u002Fget-me",{"label":123,"color":124},{"title":279,"path":280,"stem":281,"badge":282},"读取本人的帖子","\u002Fapi\u002Fpersonal\u002Flist-own-posts","2.api\u002F2.personal\u002Flist-own-posts",{"label":123,"color":124},{"title":284,"path":285,"stem":286,"badge":287},"读取本人的资源","\u002Fapi\u002Fpersonal\u002Flist-own-resources","2.api\u002F2.personal\u002Flist-own-resources",{"label":123,"color":124},{"title":131,"path":289,"stem":290,"badge":291},"\u002Fapi\u002Fpersonal\u002Fpersonal-find-resource-names","2.api\u002F2.personal\u002Fpersonal-find-resource-names",{"label":123,"color":124},{"title":293,"path":294,"stem":295,"badge":296},"读取本人可见的组织","\u002Fapi\u002Fpersonal\u002Fpersonal-get-organization","2.api\u002F2.personal\u002Fpersonal-get-organization",{"label":123,"color":124},{"title":146,"path":298,"stem":299,"badge":300},"\u002Fapi\u002Fpersonal\u002Fpersonal-get-post","2.api\u002F2.personal\u002Fpersonal-get-post",{"label":123,"color":124},{"title":151,"path":302,"stem":303,"badge":304},"\u002Fapi\u002Fpersonal\u002Fpersonal-get-resource","2.api\u002F2.personal\u002Fpersonal-get-resource",{"label":123,"color":124},{"title":306,"path":307,"stem":308,"badge":309},"列出本人组织","\u002Fapi\u002Fpersonal\u002Fpersonal-list-organizations","2.api\u002F2.personal\u002Fpersonal-list-organizations",{"label":123,"color":124},{"title":186,"path":311,"stem":312,"badge":313},"\u002Fapi\u002Fpersonal\u002Fpersonal-list-posts","2.api\u002F2.personal\u002Fpersonal-list-posts",{"label":123,"color":124},{"title":191,"path":315,"stem":316,"badge":317},"\u002Fapi\u002Fpersonal\u002Fpersonal-list-resources","2.api\u002F2.personal\u002Fpersonal-list-resources",{"label":123,"color":124},{"title":201,"path":319,"stem":320,"badge":321},"\u002Fapi\u002Fpersonal\u002Fpersonal-post-replies","2.api\u002F2.personal\u002Fpersonal-post-replies",{"label":123,"color":124},{"title":206,"path":323,"stem":324,"badge":325},"\u002Fapi\u002Fpersonal\u002Fpersonal-resource-releases","2.api\u002F2.personal\u002Fpersonal-resource-releases",{"label":123,"color":124},{"title":211,"path":327,"stem":328,"badge":329},"\u002Fapi\u002Fpersonal\u002Fpersonal-resource-updates","2.api\u002F2.personal\u002Fpersonal-resource-updates",{"label":123,"color":124},{"title":331,"path":332,"stem":333,"badge":334},"回复帖子","\u002Fapi\u002Fpersonal\u002Freply-post","2.api\u002F2.personal\u002Freply-post",{"label":244,"color":245},{"title":336,"path":337,"stem":338,"badge":339},"编辑组织资料","\u002Fapi\u002Fpersonal\u002Fupdate-organization","2.api\u002F2.personal\u002Fupdate-organization",{"label":237,"color":238},{"title":341,"path":342,"stem":343,"badge":344},"修改本人帖子","\u002Fapi\u002Fpersonal\u002Fupdate-post","2.api\u002F2.personal\u002Fupdate-post",{"label":345,"color":238},"PATCH",{"title":347,"path":348,"stem":349,"badge":350},"修改本人维护的发布记录","\u002Fapi\u002Fpersonal\u002Fupdate-release","2.api\u002F2.personal\u002Fupdate-release",{"label":345,"color":238},{"title":352,"path":353,"stem":354,"badge":355},"修改本人维护的资源","\u002Fapi\u002Fpersonal\u002Fupdate-resource","2.api\u002F2.personal\u002Fupdate-resource",{"label":345,"color":238},{"title":357,"icon":358,"path":359,"stem":360,"children":361},"开放平台","i-lucide-shield-check","\u002Fapi\u002Foauth","2.api\u002F3.oauth\u002Findex",[362,363,368,373,378,383],{"title":117,"path":359,"stem":360},{"title":364,"path":365,"stem":366,"badge":367},"发起授权码流程","\u002Fapi\u002Foauth\u002Fauthorize-oauth","2.api\u002F3.oauth\u002Fauthorize-oauth",{"label":123,"color":124},{"title":369,"path":370,"stem":371,"badge":372},"交换、刷新令牌或签发机器人令牌","\u002Fapi\u002Foauth\u002Fexchange-oauth-token","2.api\u002F3.oauth\u002Fexchange-oauth-token",{"label":244,"color":245},{"title":374,"path":375,"stem":376,"badge":377},"读取授权用户信息","\u002Fapi\u002Foauth\u002Fget-oauth-userinfo","2.api\u002F3.oauth\u002Fget-oauth-userinfo",{"label":123,"color":124},{"title":379,"path":380,"stem":381,"badge":382},"列出可申请的 OAuth scope","\u002Fapi\u002Foauth\u002Flist-oauth-scopes","2.api\u002F3.oauth\u002Flist-oauth-scopes",{"label":123,"color":124},{"title":384,"path":385,"stem":386,"badge":387},"撤销访问或刷新令牌","\u002Fapi\u002Foauth\u002Frevoke-oauth-token","2.api\u002F3.oauth\u002Frevoke-oauth-token",{"label":244,"color":245},{"title":389,"path":390,"stem":391,"children":392,"icon":425},"精简资源查询","\u002Fapi\u002Fpublic-v1","2.api\u002F4.public-v1\u002Findex",[393,394,399,406,411,416,420],{"title":117,"path":390,"stem":391},{"title":395,"path":396,"stem":397,"badge":398},"读取公开资源详情","\u002Fapi\u002Fpublic-v1\u002Fpublic-v1-get-resource","2.api\u002F4.public-v1\u002Fpublic-v1-get-resource",{"label":123,"color":124},{"title":400,"path":401,"stem":402,"badge":403},"读取公开资源详情（HEAD）","\u002Fapi\u002Fpublic-v1\u002Fpublic-v1-head-get-resource","2.api\u002F4.public-v1\u002Fpublic-v1-head-get-resource",{"label":404,"color":405},"HEAD","neutral",{"title":407,"path":408,"stem":409,"badge":410},"筛选公开资源（HEAD）","\u002Fapi\u002Fpublic-v1\u002Fpublic-v1-head-list-resources","2.api\u002F4.public-v1\u002Fpublic-v1-head-list-resources",{"label":404,"color":405},{"title":412,"path":413,"stem":414,"badge":415},"读取当前兼容更新构建（HEAD）","\u002Fapi\u002Fpublic-v1\u002Fpublic-v1-head-resource-updates","2.api\u002F4.public-v1\u002Fpublic-v1-head-resource-updates",{"label":404,"color":405},{"title":191,"path":417,"stem":418,"badge":419},"\u002Fapi\u002Fpublic-v1\u002Fpublic-v1-list-resources","2.api\u002F4.public-v1\u002Fpublic-v1-list-resources",{"label":123,"color":124},{"title":421,"path":422,"stem":423,"badge":424},"读取当前兼容更新构建","\u002Fapi\u002Fpublic-v1\u002Fpublic-v1-resource-updates","2.api\u002F4.public-v1\u002Fpublic-v1-resource-updates",{"label":123,"color":124},"i-lucide-network",{"title":427,"icon":428,"path":429,"stem":430,"children":431},"Webhook","i-lucide-webhook","\u002Fapi\u002Fwebhooks","2.api\u002F5.webhooks\u002Findex",[432,433,438,443,448,453,458,463,468,473,478],{"title":117,"path":429,"stem":430},{"title":434,"path":435,"stem":436,"badge":437},"申请创建 Webhook 端点","\u002Fapi\u002Fwebhooks\u002Fcreate-webhook-endpoint","2.api\u002F5.webhooks\u002Fcreate-webhook-endpoint",{"label":244,"color":245},{"title":439,"path":440,"stem":441,"badge":442},"订阅资源发布或知识库更新","\u002Fapi\u002Fwebhooks\u002Fcreate-webhook-subscription","2.api\u002F5.webhooks\u002Fcreate-webhook-subscription",{"label":244,"color":245},{"title":444,"path":445,"stem":446,"badge":447},"删除 Webhook 端点","\u002Fapi\u002Fwebhooks\u002Fdelete-webhook-endpoint","2.api\u002F5.webhooks\u002Fdelete-webhook-endpoint",{"label":266,"color":267},{"title":449,"path":450,"stem":451,"badge":452},"删除资源订阅","\u002Fapi\u002Fwebhooks\u002Fdelete-webhook-subscription","2.api\u002F5.webhooks\u002Fdelete-webhook-subscription",{"label":266,"color":267},{"title":454,"path":455,"stem":456,"badge":457},"查看投递记录","\u002Fapi\u002Fwebhooks\u002Flist-webhook-deliveries","2.api\u002F5.webhooks\u002Flist-webhook-deliveries",{"label":123,"color":124},{"title":459,"path":460,"stem":461,"badge":462},"列出我的 Webhook 端点","\u002Fapi\u002Fwebhooks\u002Flist-webhook-endpoints","2.api\u002F5.webhooks\u002Flist-webhook-endpoints",{"label":123,"color":124},{"title":464,"path":465,"stem":466,"badge":467},"列出端点订阅","\u002Fapi\u002Fwebhooks\u002Flist-webhook-subscriptions","2.api\u002F5.webhooks\u002Flist-webhook-subscriptions",{"label":123,"color":124},{"title":469,"path":470,"stem":471,"badge":472},"重试当前版本的失败投递","\u002Fapi\u002Fwebhooks\u002Fretry-webhook-delivery","2.api\u002F5.webhooks\u002Fretry-webhook-delivery",{"label":244,"color":245},{"title":474,"path":475,"stem":476,"badge":477},"轮换 Webhook 签名密钥","\u002Fapi\u002Fwebhooks\u002Frotate-webhook-secret","2.api\u002F5.webhooks\u002Frotate-webhook-secret",{"label":244,"color":245},{"title":479,"path":480,"stem":481,"badge":482},"修改 Webhook 端点","\u002Fapi\u002Fwebhooks\u002Fupdate-webhook-endpoint","2.api\u002F5.webhooks\u002Fupdate-webhook-endpoint",{"label":345,"color":238},{"title":484,"path":485,"stem":486,"children":487,"icon":499},"机器人事件","\u002Fapi\u002Fbots","2.api\u002F6.bots\u002Findex",[488,489,494],{"title":117,"path":485,"stem":486},{"title":490,"path":491,"stem":492,"badge":493},"读取机器人事件","\u002Fapi\u002Fbots\u002Flist-bot-events","2.api\u002F6.bots\u002Flist-bot-events",{"label":123,"color":124},{"title":495,"path":496,"stem":497,"badge":498},"回复机器人事件","\u002Fapi\u002Fbots\u002Freply-bot-event","2.api\u002F6.bots\u002Freply-bot-event",{"label":244,"color":245},"i-lucide-bot",{"id":501,"title":67,"body":502,"description":1046,"extension":1047,"links":1048,"meta":1049,"navigation":1050,"path":68,"seo":1051,"stem":69,"__hash__":1052},"docs\u002F1.guide\u002F2.personal-access-tokens.md",{"type":503,"value":504,"toc":1044},"minimark",[505,509,521,572,587,590,597,966,973,1033,1040],[506,507,508],"p",{},"个人访问令牌（PAT）适合你自己控制的脚本和工具。登录 NexusMC 后在账号的 API 令牌管理页创建令牌，勾选实际需要的权限。令牌秘密只在创建或轮换时返回一次；请立即保存到服务端的安全配置中。",[506,510,511,512,515,516,520],{},"调用",[513,514,226],"a",{"href":228},"时，通过 ",[517,518,519],"code",{},"Authorization: Bearer \u003Ctoken>"," 发送令牌：",[522,523,528],"pre",{"className":524,"code":525,"language":526,"meta":527,"style":527},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -H \"Authorization: Bearer $NEXUSMC_PAT\" \\\n  'http:\u002F\u002F127.0.0.1:4520\u002Fv1\u002Fpersonal\u002Fresources?limit=10'\n","bash","",[517,529,530,560],{"__ignoreMap":527},[531,532,535,539,543,547,550,554,557],"span",{"class":533,"line":534},"line",1,[531,536,538],{"class":537},"sBMFI","curl",[531,540,542],{"class":541},"sfazB"," -H",[531,544,546],{"class":545},"sMK4o"," \"",[531,548,549],{"class":541},"Authorization: Bearer ",[531,551,553],{"class":552},"sTEyZ","$NEXUSMC_PAT",[531,555,556],{"class":545},"\"",[531,558,559],{"class":552}," \\\n",[531,561,563,566,569],{"class":533,"line":562},2,[531,564,565],{"class":545},"  '",[531,567,568],{"class":541},"http:\u002F\u002F127.0.0.1:4520\u002Fv1\u002Fpersonal\u002Fresources?limit=10",[531,570,571],{"class":545},"'\n",[506,573,574,575,578,579,582,583,586],{},"此示例要求 ",[517,576,577],{},"resource:read:feed","。PAT 可选择资源、帖子、本人资料和组织相关的 14 个 scope；每个操作要求的 scope 写在",[513,580,581],{"href":228},"个人 API 参考","中。令牌不会创建网站登录会话，也不能用于账号安全设置、后台、私信或媒体控制。需要代表其他用户访问时，请使用",[513,584,585],{"href":72},"开放平台授权","。",[506,588,589],{},"不要把令牌放进浏览器代码、URL、文档站配置或公开仓库。轮换会立即使旧秘密失效；调用失败时检查令牌是否过期、是否已撤销，以及 scope 是否覆盖该操作。",[506,591,592,593,596],{},"创建帖子需要 ",[517,594,595],{},"post:create","。以下代码在服务端 Node.js\u002FTypeScript 运行，从环境变量取得秘密：",[522,598,602],{"className":599,"code":600,"language":601,"meta":527,"style":527},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const token = process.env.NEXUSMC_PAT\nif (!token) throw new Error('请先设置 NEXUSMC_PAT')\nconst response = await fetch('http:\u002F\u002F127.0.0.1:4520\u002Fv1\u002Fpersonal\u002Fposts', {\n  method: 'POST',\n  headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application\u002Fjson' },\n  body: JSON.stringify({ title: 'Fabric 性能配置交流', body: '分享配置与测试结果。' }),\n})\nif (!response.ok) throw new Error(`发帖失败：${response.status} ${await response.text()}`)\nconst result = await response.json() as { ok: true; id: string }\nconsole.log(result.id)\n","ts",[517,603,604,630,669,700,720,772,827,835,898,947],{"__ignoreMap":527},[531,605,606,610,613,616,619,622,625,627],{"class":533,"line":534},[531,607,609],{"class":608},"spNyl","const",[531,611,612],{"class":552}," token ",[531,614,615],{"class":545},"=",[531,617,618],{"class":552}," process",[531,620,621],{"class":545},".",[531,623,624],{"class":552},"env",[531,626,621],{"class":545},[531,628,629],{"class":552},"NEXUSMC_PAT\n",[531,631,632,636,639,642,645,648,651,655,658,661,664,666],{"class":533,"line":562},[531,633,635],{"class":634},"s7zQu","if",[531,637,638],{"class":552}," (",[531,640,641],{"class":545},"!",[531,643,644],{"class":552},"token) ",[531,646,647],{"class":634},"throw",[531,649,650],{"class":545}," new",[531,652,654],{"class":653},"s2Zo4"," Error",[531,656,657],{"class":552},"(",[531,659,660],{"class":545},"'",[531,662,663],{"class":541},"请先设置 NEXUSMC_PAT",[531,665,660],{"class":545},[531,667,668],{"class":552},")\n",[531,670,672,674,677,679,682,685,687,689,692,694,697],{"class":533,"line":671},3,[531,673,609],{"class":608},[531,675,676],{"class":552}," response ",[531,678,615],{"class":545},[531,680,681],{"class":634}," await",[531,683,684],{"class":653}," fetch",[531,686,657],{"class":552},[531,688,660],{"class":545},[531,690,691],{"class":541},"http:\u002F\u002F127.0.0.1:4520\u002Fv1\u002Fpersonal\u002Fposts",[531,693,660],{"class":545},[531,695,696],{"class":545},",",[531,698,699],{"class":545}," {\n",[531,701,703,707,710,713,715,717],{"class":533,"line":702},4,[531,704,706],{"class":705},"swJcz","  method",[531,708,709],{"class":545},":",[531,711,712],{"class":545}," '",[531,714,244],{"class":541},[531,716,660],{"class":545},[531,718,719],{"class":545},",\n",[531,721,723,726,728,731,734,736,739,742,745,748,751,753,755,758,760,762,764,767,769],{"class":533,"line":722},5,[531,724,725],{"class":705},"  headers",[531,727,709],{"class":545},[531,729,730],{"class":545}," {",[531,732,733],{"class":705}," Authorization",[531,735,709],{"class":545},[531,737,738],{"class":545}," `",[531,740,741],{"class":541},"Bearer ",[531,743,744],{"class":545},"${",[531,746,747],{"class":552},"token",[531,749,750],{"class":545},"}`",[531,752,696],{"class":545},[531,754,712],{"class":545},[531,756,757],{"class":705},"Content-Type",[531,759,660],{"class":545},[531,761,709],{"class":545},[531,763,712],{"class":545},[531,765,766],{"class":541},"application\u002Fjson",[531,768,660],{"class":545},[531,770,771],{"class":545}," },\n",[531,773,775,778,780,783,785,788,790,793,796,798,800,803,805,807,810,812,814,817,819,822,825],{"class":533,"line":774},6,[531,776,777],{"class":705},"  body",[531,779,709],{"class":545},[531,781,782],{"class":552}," JSON",[531,784,621],{"class":545},[531,786,787],{"class":653},"stringify",[531,789,657],{"class":552},[531,791,792],{"class":545},"{",[531,794,795],{"class":705}," title",[531,797,709],{"class":545},[531,799,712],{"class":545},[531,801,802],{"class":541},"Fabric 性能配置交流",[531,804,660],{"class":545},[531,806,696],{"class":545},[531,808,809],{"class":705}," body",[531,811,709],{"class":545},[531,813,712],{"class":545},[531,815,816],{"class":541},"分享配置与测试结果。",[531,818,660],{"class":545},[531,820,821],{"class":545}," }",[531,823,824],{"class":552},")",[531,826,719],{"class":545},[531,828,830,833],{"class":533,"line":829},7,[531,831,832],{"class":545},"}",[531,834,668],{"class":552},[531,836,838,840,842,844,847,849,852,854,856,858,860,863,866,868,870,872,875,877,880,883,886,888,891,894,896],{"class":533,"line":837},8,[531,839,635],{"class":634},[531,841,638],{"class":552},[531,843,641],{"class":545},[531,845,846],{"class":552},"response",[531,848,621],{"class":545},[531,850,851],{"class":552},"ok) ",[531,853,647],{"class":634},[531,855,650],{"class":545},[531,857,654],{"class":653},[531,859,657],{"class":552},[531,861,862],{"class":545},"`",[531,864,865],{"class":541},"发帖失败：",[531,867,744],{"class":545},[531,869,846],{"class":552},[531,871,621],{"class":545},[531,873,874],{"class":552},"status",[531,876,832],{"class":545},[531,878,879],{"class":545}," ${",[531,881,882],{"class":634},"await",[531,884,885],{"class":552}," response",[531,887,621],{"class":545},[531,889,890],{"class":653},"text",[531,892,893],{"class":552},"()",[531,895,750],{"class":545},[531,897,668],{"class":552},[531,899,901,903,906,908,910,912,914,917,920,923,925,928,930,933,936,939,941,944],{"class":533,"line":900},9,[531,902,609],{"class":608},[531,904,905],{"class":552}," result ",[531,907,615],{"class":545},[531,909,681],{"class":634},[531,911,885],{"class":552},[531,913,621],{"class":545},[531,915,916],{"class":653},"json",[531,918,919],{"class":552},"() ",[531,921,922],{"class":634},"as",[531,924,730],{"class":545},[531,926,927],{"class":705}," ok",[531,929,709],{"class":545},[531,931,932],{"class":537}," true",[531,934,935],{"class":545},";",[531,937,938],{"class":705}," id",[531,940,709],{"class":545},[531,942,943],{"class":537}," string",[531,945,946],{"class":545}," }\n",[531,948,950,953,955,958,961,963],{"class":533,"line":949},10,[531,951,952],{"class":552},"console",[531,954,621],{"class":545},[531,956,957],{"class":653},"log",[531,959,960],{"class":552},"(result",[531,962,621],{"class":545},[531,964,965],{"class":552},"id)\n",[506,967,968,969,972],{},"等价的 shell 请求（先在本地安全地设置 ",[517,970,971],{},"NEXUSMC_PAT","）：",[522,974,976],{"className":524,"code":975,"language":526,"meta":527,"style":527},"curl --fail-with-body 'http:\u002F\u002F127.0.0.1:4520\u002Fv1\u002Fpersonal\u002Fposts' \\\n  --header \"Authorization: Bearer $NEXUSMC_PAT\" \\\n  --header 'Content-Type: application\u002Fjson' \\\n  --data '{\"title\":\"Fabric 性能配置交流\",\"body\":\"分享配置与测试结果。\"}'\n",[517,977,978,993,1008,1021],{"__ignoreMap":527},[531,979,980,982,985,987,989,991],{"class":533,"line":534},[531,981,538],{"class":537},[531,983,984],{"class":541}," --fail-with-body",[531,986,712],{"class":545},[531,988,691],{"class":541},[531,990,660],{"class":545},[531,992,559],{"class":552},[531,994,995,998,1000,1002,1004,1006],{"class":533,"line":562},[531,996,997],{"class":541},"  --header",[531,999,546],{"class":545},[531,1001,549],{"class":541},[531,1003,553],{"class":552},[531,1005,556],{"class":545},[531,1007,559],{"class":552},[531,1009,1010,1012,1014,1017,1019],{"class":533,"line":671},[531,1011,997],{"class":541},[531,1013,712],{"class":545},[531,1015,1016],{"class":541},"Content-Type: application\u002Fjson",[531,1018,660],{"class":545},[531,1020,559],{"class":552},[531,1022,1023,1026,1028,1031],{"class":533,"line":702},[531,1024,1025],{"class":541},"  --data",[531,1027,712],{"class":545},[531,1029,1030],{"class":541},"{\"title\":\"Fabric 性能配置交流\",\"body\":\"分享配置与测试结果。\"}",[531,1032,571],{"class":545},[506,1034,1035,1036,1039],{},"请求成功会返回 ",[517,1037,1038],{},"{ \"ok\": true, \"id\": \"新帖子的稳定 ID\" }","。这会实际创建内容，请使用自己的测试环境。",[1041,1042,1043],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":527,"searchDepth":562,"depth":562,"links":1045},[],"为自己的工具使用有限的个人 API 权限。","md",null,{},true,{"title":67,"description":1046},"PLdrGH1bg0ArymeC4B-ycYvcvPVvP0pevrBMnm9hUrc",[1054,1056],{"title":63,"path":64,"stem":65,"description":1055,"children":-1},"选择公开查询、个人令牌、开放平台或机器人事件，完成第一次请求。",{"title":71,"path":72,"stem":73,"description":1057,"children":-1},"使用 confidential client 和 S256 PKCE 获得用户授权。",1795179028017]