Php 通过API调用将文件添加到Podio项
我编写了以下PHP代码:Php 通过API调用将文件添加到Podio项,php,podio,Php,Podio,我编写了以下PHP代码: <?php require_once '../podio-php/PodioAPI.php'; //Initalize Podio connection $client_id = ""; $client_secret = ""; Podio::setup($client_id, $client_secret); //App ID's $opname_app_id = 19082139; $opname_app_token = ""; $opname
<?php
require_once '../podio-php/PodioAPI.php';
//Initalize Podio connection
$client_id = "";
$client_secret = "";
Podio::setup($client_id, $client_secret);
//App ID's
$opname_app_id = 19082139;
$opname_app_token = "";
$opname_auth = Podio::$oauth;
Podio::authenticate_with_app($opname_app_id, $opname_app_token);
$attributes = array('ref_type' => 'item', 'ref_id' => 3492);
$upload_result = PodioFile::upload("../questions.php", 'test');
$file_id = $upload_result->file_id;
PodioFile::attach($file_id, $attributes);
即使我有项目3492是在应用程序19082139。有人能帮我解决这个问题吗?我99.999999%确定您不能拥有id为3492的商品。请再次检查您是否正在使用
item\u id
,而不是app\u item\u id
<代码>项目id在整个Podio中是唯一的,而应用程序项目id
在单个应用程序中是唯一的
您可以从Podio UI、项目页面、菜单“操作->开发人员信息”中找到
item\u id
文件是否已附加到任何其他项目?
Uncaught PodioForbiddenError: "The app with id 19082139 does not have the right add_file on item with id 3492"