我正在編寫我的 slack 機器人,我想在選擇后將 prev 消息更改為新的變量,這是我在選擇后觸發的操作:slackInteractions.action({ type: "static_select" }, (payload, res) => { console.log(payload); web.chat .update({ token: slackSigningSecret, channel: payload.container.channel_id, ts: payload.container.message_ts, as_user: true, text: "Hello World" }) .catch(err => { console.log(err); });});我得到了錯誤:Error: An API error occurred: invalid_auth at Object.platformErrorFromResult (/home/codex/Documents/dan-bot/node_modules/@slack/web-api/dist/errors.js:50:33) at WebClient.apiCall (/home/codex/Documents/dan-bot/node_modules/@slack/web-api/dist/WebClient.js:485:28) at processTicksAndRejections (internal/process/task_queues.js:97:5) { code: 'slack_webapi_platform_error', data: { ok: false, error: 'invalid_auth', response_metadata: {} }}這是有效載荷:{ type: 'block_actions', team: { id: '//', domain: '*** }, user: { id: 'U010Q9X59QT', username: '**', name: '***', team_id: '//' }, api_app_id: '///', token: '***', container: { type: 'message', message_ts: '1585662258.008100', channel_id: '****', is_ephemeral: true }, trigger_id: '1038328652789.1035324920279.b84d3403b8e44ab0cd53c997ba8b4c72', channel: { id: '***', name: 'directmessage' }, response_url: 'https://hooks.slack.com/actions/T01119JT287/1040413692903/6TWTQqXhcp453TPREb7uRcPn', actions: [ { type: 'static_select', action_id: 'wkR', block_id: 'LM9', selected_option: [Object], placeholder: [Object], action_ts: '1585662260.040519' } ]}作為令牌,我使用我的主要松弛令牌,使用它我試圖將我看到變體的塊更改為另一個塊,目前試圖更改為字符串“Hello world”謝謝轉發?。。?!
錯誤:發生 API 錯誤:invalid_auth
繁花不似錦
2022-06-09 11:14:04