안녕하세요~
php로 캠페인 상태변경을 요청하면 필수 파라메터가 없다고 나와서요~
$ch = curl_init();
$data = ‘{“config”: “OFF”}’;
curl_setopt($ch, CURLOPT_URL, ‘https://api.keywordad.kakao.com/openapi/v1/campaigns/218559690411085824/onOff’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “PATCH”);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HEADER, true);
$header = array(
‘application/x-www-form-urlencoded;charset=utf-8’,
‘Content-Type: application/json’,
‘Authorization: Bearer W0EV9eC96p4D6fqbu3FUsnISqhqNkjqDId-…’ ,
‘adAccountId: 305373’
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
이렇게 호출했는데 혹시 잘못된 부분 있을까요? 확인 부탁드리겠습니다.
감사합니다.