我正在尝试通过POST
脚本发出一个Google Scripts
请求,以通过mailchimp
在API
中注册成员。
var payloadMail = {
"email_address" : "teste@teste.com.br",
"status" : "subscribed",
}
var headersMail = {
'Authorization': 'apikey ******',
"content-type" : "application/json",
};
var optionsMail = {
"method" : "post",
"data" : payloadMail,
"headers" : headersMail,
}
var respMail = UrlFetchApp.fetch(
"https://us18.api.mailchimp.com/3.0/lists/******/members" ,
optionsMail);
我正在发送邮件,但是它给出了此错误:
{
"type":"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/",
"title":"Invalid Resource",
"status":400,
"detail":"The resource submitted could not be validated. For, []]...)
[0 segundos]
当我通过postman
发出相同的请求时,它就起作用了。
有什么建议吗?