【发布时间】:2023-03-06 19:51:01
【问题描述】:
我正在尝试使用 MailChimp - Search Members 函数。我想将此操作用作一般搜索,以从与查询匹配的所有列表中检索成员。
当我尝试示例中格式的 URI 时:
https://us13.api.mailchimp.com/3.0/search-members?query=freddie@
我收到以下错误:
{"type":"https://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"Invalid Resource","status":400,"detail":"An error occurred: Sorry, we're unable to search at the moment.","instance":""}
如果我遗漏了查询参数,我会收到以下错误:
{"type":"https://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"Invalid Resource","status":400,"detail":"Please provide 'query' parameter in the query string to search","instance":""}
所以该方法可用,并且正在解析我的请求 URI。
我认为查询参数的格式不正确,但是经过大量研究后,我无法找到如何格式化查询参数。
【问题讨论】:
-
您使用什么工具提出请求?另外,您如何在请求中提供您的 api 密钥?
-
本论坛不允许发布相关信息 新用户不得发布多个链接,以减少帖子中的垃圾邮件和恶意链接。由于您的代码未格式化为代码,因此它正在尝试链接到页面的代码中的链接。另请注意this restriction gets lifted once you reach 10 rep.