Circuit SDK - 使用 SDK post 带附件的消息需要哪个范围?

Circuit SDK - Which scope is needed to post messages with attachments using the SDK?

看来我只能在分配范围 ALL 的情况下发送消息。如果我将机器人的权限限制为 READ_CONVERSATIONS 只有它失败了:

{"name":"app","hostname":"ldap-01-fth01ti-de","pid":1740,"level":50,"msg":"[APP]: { [Error: Internal error with Client Credentials Grant authentication]\n code: 'SDK_ERROR',\n message: 'Internal error with Client Credentials Grant authentication',\n stack: 'Error\n at Error (native)\n at Error.circuit.Error (/home/ldapuser/bin/node_modules/circuit-sdk/circuit.js:309:22)\n at /home/ldapuser/bin/node_modules/circuit-sdk/circuit.js:46269:32\n at process._tickCallback (node.js:438:9)' }","time":"2018-07-24T08:14:27.930Z","v":0}

如果使用授权类型 CLIENT_CREDENTIALS,这些范围是否应该用于限制机器人功能?

要发送消息,您需要范围 "WRITE_CONVERSATIONS" 或 "ALL"。

对于 IMPLICIT 和 AUTHORIZATION CODE 授权类型,请求的范围会在 OAuth 权限弹出窗口中显示给用户。

正确,对于 CLIENT CREDENTIALS 授权类型,这些范围限制了机器人功能。

每个 JS SDK API 列出了允许 API 调用的范围。 例如。见 addTextItem 需要 "WRITE_CONVERSATIONS" 或 "ALL".