【问题标题】:Creating an asana task with asana api gives invalid identifier error使用 asana api 创建 asana 任务会出现无效标识符错误
【发布时间】:2018-10-26 13:08:55
【问题描述】:

我的有效负载看起来像这样。

var data={
                  "workspace":"1234",
                   "name": task_name ,
                   "notes":striped_msg ,
                   "memberships":[
                     {
                       "project":678,
                        "section":111
                      },
                     {
                       "project":1230
                     }
                   ],
                    "custom_fields":{
                       "303093523672299":"303093523672300"
                        },
                       "due_on":string_date
                     }

像这样发送有效载荷。

 var status = await asanaService.addTask(JSON.stringify(data))

得到以下错误响应

{"errors":[{"message":"Could not interpret {\"workspace\":"1234",\"name\":\"rohit as an identifier in {\"workspace\":"1234",\"name\":\"rohit.one [ Mysql cpu ]\",\"notes\":..............","help":"For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors"}]}

【问题讨论】:

    标签: javascript asana-api


    【解决方案1】:

    我在发布期间缺少 JSON 标头

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-15
      • 1970-01-01
      • 1970-01-01
      • 2016-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多