Reputation: 41
I am trying to create an app in Podio via API on my laravel web app, however whenever I call the PodioApp::create() function it returns with PodioBadRequestError in Podio.php line 289 exception. Now i'm not sure if I will need to request for a increased trust level on my API keys from support but here is my code:
$timeclock_app = PodioApp::create(array( 'space_id' => $workspace->space_id,
'type' => 'standard',
'name' => 'Timeclocks',
'item_name' => 'Timeclock',
'icon' => '270.png',
));
return dd($timeclock_app);
Thanks in advance!
Upvotes: 2
Views: 369
Reputation: 3003
I believe all you're missing is data while sending your app create request.
This is an example of a complete (minimal) JSON payload needed to create an app.
All the config information are mandatory, as well as at least one field.
Everything else is optional.
{
"config": {
"type": "standard",
"app_item_id_padding": 1,
"app_item_id_prefix": "",
"show_app_item_id": false,
"allow_comments": true,
"allow_create": true,
"allow_edit": true,
"allow_attachments": true,
"silent_creates": false,
"silent_edits": false,
"disable_notifications": false,
"default_view": "badge",
"allow_tags": false,
"icon": "251.png",
"name": "App",
"item_name": "item"
},
"space_id": 22788,
"fields": [
{
"config": {
"label": "Title",
"settings": {
"size": "small"
},
"required": false
},
"type": "text"
}
]
}
Upvotes: 2