PodioForbiddenError on item delete
I try to delete an item using the API, but the API allways returns an error.
Here is part of my PHP code:
===
require_once 'podio-php-4.3.0/PodioAPI.php';
$myClientID ="---"; //removed, but working for other calls
$myClientSecret ="---"; //removed, but working for other calls
Podio::setup($myClientID, $myClientSecret);
$myAppID ="4321"; //correct appid
$myAppToken ="--"; //correct token
Podio::authenticate_with_app($myAppID, $myAppToken);
$result = PodioItem::delete('12345');
====
Returns:
Fatal error: Uncaught PodioForbiddenError: "The app with id 4321 does not have the right delete on item with id 12345" Request URL:http://api.podio.com/item/12345 Stack Trace: #0 /mnt/webw/c3/69/56917069/htdocs/knoppacloud/mmxx/podio-php-4.3.0/lib/Podio.php(358): Podio::request('DELETE', '/item/12345', Array) #1/mnt/webw/c3/69/56917069/htdocs/knoppacloud/mmxx/podio-php-4.3.0/models/PodioItem.php(143): Podio::delete('/item/12345', Array) #2 /mnt/webw/c3/69/56917069/htdocs/knoppacloud/mmxx/empty_impromptu.php(48): PodioItem::delete('12345') #3 {main} thrown in /mnt/webw/c3/69/56917069/htdocs/knoppacloud/mmxx/podio-php-4.3.0/lib/Podio.php on line 319
===
Any ideas? All id's are correct.
A simulair problem was answered with: You authenticate as a light user, and you need to have admin rights. But if this is true, you will never be able to use the delete of bulk_delete API calls. So that is not a solution!
-
Hi Kees,
To authenticate as an Admin you should use "password authentication" which is described on https://podio.github.io/podio-php/authentication/
Please let me know if that helps.
Please sign in to leave a comment.
Comments
5 comments