我试图在用户按下按钮后通过谷歌应用程序脚本在松弛中打开一个对话框,但我收到以下错误消息:
{"ok":false,"error":"invalid_auth","warning":"missing_charset","response_metadata":{"warnings":["missing_charset"]}}
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
function openDialog (range, triggerId, token) {
var url = 'https://slack.com/api/dialog.open';
var dialog = {
trigger_id: triggerId,
title: 'Submit a helpdesk ticket',
callback_id: 'submit-ticket',
submit_label: 'Submit',
elements: [
{
label: 'Title',
type: 'text',
name: 'title',
value: 'teste',
hint: '30 second summary of the problem',
},
{
label: 'Description',
type: 'textarea',
name: 'description',
optional: true,
},
{
label: 'Urgency',
type: 'select',
name: 'urgency',
options: [
{ label: 'Low', value: 'Low' },
{ label: 'Medium', value: 'Medium' },
{ label: …Run Code Online (Sandbox Code Playgroud)