Curl Podio使用Procfu创建项目返回错误

Curl Podio使用Procfu创建项目返回错误,curl,podio,Curl,Podio,我需要使用procfu在Podio中创建一个项目,如下所示: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://procfu.com/exe/podio_item_create.pf"); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Basic MjI4M***********************"] ); curl_setopt($ch, CURLOPT_POS

我需要使用procfu在Podio中创建一个项目,如下所示:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://procfu.com/exe/podio_item_create.pf");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Basic MjI4M***********************"] );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, HTTP_BUILD_QUERY(["app_id"=>"212*****","fields" => ["title"=>'tst']]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($ch);
curl_close ($ch);
print_r ($result);
但脚本返回错误:

错误:PodioBadRequestError:“无效值null(null):必须为非空。” 空”


如果有人需要,这就是解决方案:

curl_setopt($ch, CURLOPT_POSTFIELDS, HTTP_BUILD_QUERY(["app_id"=>"********","fields" => json_encode(["title"=>'tst'])]));

我不明白为什么这个问题被否决了,这是一个非常相关的问题

该解决方案帮助我在ProcFU中实现此功能

function create_app_item_with_import_file($id) {

$ret = call_pf_script("podio_item_create.pf",["app_id" => nnnnnnnn,"fields" => json_encode(["title"=>'started']),"hook" => false,"silent" => false]);  //create empty item in Imports app

return $ret;

})

这听起来像是您的web服务器拒绝了您的请求。