如何解决GuzzleHttp\Exception\ClientException 404 not found, Mailchimp 我不想让它停止搜索
GuzzleHttp\Exception\ClientException 404 not found
API 密钥与列表不匹配时出错。我希望他继续尝试,直到找到合适的然后归还
$result = [];
foreach ($shows as $show) {
// Show is all API KEYS
$mailchimp = new Mailchimp($show->authorizationcode);
$client = new \MailchimpMarketing\apiclient();
$client->setConfig([
'apiKey' => $mailchimp->apikey,'server' => $mailchimp->request->getExpApikey()['1'],]);
// $request->mailchimplist is the campaign id,and gives an error when it does not match with the api key
$response = $client->campaigns->get("$request->mailchimplist");
$result = array_merge($result,$response);
}
return response()->json($result,200);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。