最近搜索
没有最近搜索

KAZUYUKI NITANAI
已加入2025年1月27日
·
最后活动2025年2月03日
关注
0
关注者
0
活动总数
3
投票
0
订阅
1
活动概览
标记
文章
帖子
社区评论
文章评论
活动概览
的最新活动 KAZUYUKI NITANAI
KAZUYUKI NITANAI 进行了评论,
Hi James
I ran cURL and it ran without any problems.
This indicated a problem with the gas, so I checked again,
'contentType': 'application/json',
was incorrect and
'Content-Type': 'application/json',
was the correct way to describe it.
Because of this mistake, subsequent payloads could not recognize it.
The problem has been resolved. Thank you for your cooperation.
查看评论 · 已于 2025年2月03日 发布 · KAZUYUKI NITANAI
0
关注者
0
投票
0
评论
KAZUYUKI NITANAI 创建了一个帖子,
Hello everyone,
As you read the following, I am trying to create something in gas that will create articles in the Help Center.
It says that required fields are missing, but what is missing?
Referring URL
https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/
See Create Article
Created program (gas)
*How to execute the API
function zendeskPostArticle() {
var url = 'https://xxxxxxxxx.zendesk.com/api/v2/help_center/ja/sections/**********/articles';
const TOKEN = '********';
const EMAIL = '********';
var postjson = {
"article": {
"body": "Use a tripod",
"locale": "ja",
"permission_group_id": ******,
"title": "Taking photos in low light",
"user_segment_id": *****
},
"notify_subscribers": false
}
var options = {
'method': 'POST',
'headers': {
'Authorization': "Basic " + Utilities.base64Encode(Utilities.newBlob(EMAIL + '/token:' + TOKEN).getBytes()),
'contentType': 'application/json',
'Accept': 'application/json'
},
'payload': JSON.stringify(postjson)
};
var response = UrlFetchApp.fetch(url, options);
var json = JSON.parse(response.getContentText("UTF-8"));
}
The error that occurred:
Exception: Request failed for https://xxxxxxxxx.zendesk.com returned code 400. Truncated server response: Required parameter missing: article
thank you
已于 2025年1月27日 编辑 · KAZUYUKI NITANAI
0
关注者
2
投票
2
评论