本页内容
Sommatic 文档
打开控制台

认证 Beta

使用 Veripass 为你的组织签发的 Bearer 令牌认证 API 请求。Webhook 则通过各自的 ingress binding 进行认证。

以 Markdown 查看
在以下应用中打开

每个 API 请求都要表明发起者是谁。Sommatic AI 依据这一身份把你能看到的数据限定在所属组织内,并记录每次运行、 每个任务和每项变更是由谁完成的。

携带 Bearer 令牌

在每个请求的 Authorization 请求头中发送令牌:

Authorization: Bearer <token>

令牌由 Sommatic AI 的身份权威 Veripass 为你的组织签发,包含你的身份、所属组织和角色,从而让每一项敏感操作都绑定到 具体的执行者和组织。

Shell
curl "https://api.sommatic.ai/work-management/task/inbox?user_id=$USER_IDENTITY&page=1&pageSize=25" \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
JavaScript
const response = await fetch('https://api.sommatic.ai/platform-infrastructure/credential/organization-id?search=' + organizationId, {
  headers: { Authorization: `Bearer ${token}` },
});
JavaScript
import { PlatformInfrastructureCredentialService } from '@sommatic/react-sdk';

const credentials = new PlatformInfrastructureCredentialService({ apiKey: token });
const response = await credentials.getByParameters({ queryselector: 'organization-id', search: organizationId });

没有有效令牌的请求会被拒绝,返回 HTTP 401:

JSON
{ "status": 401, "success": false, "message": "Unauthorized", "result": null }

Webhook 按 binding 认证

POST /workflow-orchestration/trigger/webhooks/:mode/:bindingIdentifier 是唯一不接收 Bearer 令牌的接口: 调用工作流的外部系统通常没有 Veripass 身份。每个 Webhook 都通过一个 ingress binding 对外暴露,binding 在其 authentication 配置块中声明调用方如何认证:

authentication.modebinding 的要求
api-keybinding 的 allowed_api_keys 中的某个密钥。
oauth2具备 binding oauth_scopes 的 OAuth 2 令牌。
veripass-session按 binding 的 veripass_policy 校验的 Veripass 会话。
service-token服务令牌。
custom该集成特有的认证方案。
none无需认证。仅用于不涉及真实数据的测试 binding。
JSON
{
  "slug": "ingress.http.inbound-requests",
  "ingress_kind": "http",
  "mode": "prod",
  "authentication": { "mode": "api-key", "allowed_api_keys": ["replace-with-a-long-random-key"] }
}

使用触发器分组的接口创建和编辑 binding,这些接口需要 Bearer 令牌。 如何调用 Webhook、它的 test 与 prod 模式以及请求体,详见 Webhook。

下一步

安装智能体工具

为你的编程智能体接入 Sommatic AI 官方文档:技能包、文档 MCP 服务器与 Markdown 页面,无需再抓取网页。

仅安装技能包,不会自动更新;需要时重新运行即可。

npx skills add https://docs.sommatic.ai
智能体如何读取本文档