EDIT: I have figured out that I was trying to update by using appItemId
(local for the app) in the ItemId
field (global). The question now is how to update without using the global ItemId
.
I have setup a script to authenticate as an app.
I can script fetching and creating new items no problem, but I can't edit or delete existing items. From the error message I can gather that the app does not have permissions to modify its own items.
How do I add those permissions?
So, this works:
var item = new Item();
item.Field<TextItemField>("title").Value = "blah";
podio.ItemService.AddNewItem(appId,item);
This doesn't:
var item = new Item { ItemId = 1 };
item.Field<TextItemField>("title").Value = "blah";
podio.ItemService.UpdateItem(item);