I am attempting to assign a Task using the Podio API to a guest user.
I can do this easily through the Podio Web Interface (I do it all the time) but why can't I do this with the API?
Here is my basic code:
$resp_profiles[] = array(
'type' => 'profile',
'id' => 4346424);
PodioTask::create(array(
'text' => $subTitle,
'description' => $subTitle,
'private' => false,
'due_on' => $task_due_date->format('Y-m-d H:i:s'),
'responsible' => $resp_profiles,
));
Here is the error I get:
Fatal error: Uncaught PodioForbiddenError:
"Must be at least light on user 4346424 to perform this operation"
Request URL: http://api.podio.com/task/
Stack Trace:
#0 /home/avcorp/vhosts/pubvps/vendor/podio/podio-php/lib/Podio.php(352): Podio::request('POST', '/task/', Array, Array)
#1 /home/avcorp/vhosts/pubvps/vendor/podio/podio-php/models/PodioTask.php(78): Podio::post('/task/', Array)
#2 /home/avcorp/vhosts/pubvps/podio_rmticket/rmticket_util.php(309): PodioTask::create(Array)
#3 /home/avcorp/vhosts/pubvps/podio_rmticket/rmticket_util.php(152): rmtCreateTask(Object(AvcPodioItem), 'Carpet Cleaning', 10, 3)
#4 /home/avcorp/vhosts/pubvps/podio_rmticket/poll/rmticket_poll.php(54): test_task_creation()
#5 {main} thrown in /home/avcorp/vhosts/pubvps/vendor/podio/podio-php/lib/Podio.php on line 319
From Podio help page: https://help.podio.com/hc/en-us/articles/201019898-Member-roles-in-workspaces
Guests are users that have been invited to selected items using the
share item tool. They can edit and comment these specific items, but
cannot see anything else within the workspace, such as the full list
of members, other information in the app, or other apps in the same
workspace.
Have you tried changing role to 'Light' ?
That will also explain error message: Must be at least light on user 4346424 to perform this operation
You cannot assign a task to guest user profile even from frontend. It might be a bit confusing because you can assign task to user using mail user identifier, but that is restricted to Podio highly trusted partners only.
Related
External software (Baselinker) cannot create order in my Prestashop through the web service.
function validateOrder() on boolean in
/home/YYY/domains/XXX/public_html/classes/order/Order.php:1687 Stack trace: #0
/home/YYY/domains/XXX/public_html/classes/webservice/WebserviceRequest.php(1566): OrderCore->addWs() #1
/home/YYY/domains/XXX/public_html/classes/webservice/WebserviceRequest.php(1370): WebserviceRequestCore->saveEntityFromXml(201) #2
/home/YYY/domains/XXX/public_html/classes/webservice/WebserviceRequest.php(565): WebserviceRequestCore->executeEntityPost() #3
/home/YYY/domains/XXX/public_html/webservice/dispatcher.php(87): WebserviceRequestCore->fetch('TW76KCVK825K1UC...', 'POST', 'orders', Array, false, '<?xml version="...') #4 {main} thrown in /home/YYY/domains/XXX/public_html/classes/order/Order.php on line 1687
Here is the part of code in Order.php on line 1687.
$payment_module->validateOrder($this->id_cart, Configuration::get('PS_OS_WS_PAYMENT'),
$this->total_paid, $this->payment, null, array(), null, false, $customer->secure_key);
How to fix it?
We could have the entire class order, as well as the parameters sent, because according to the version of PS, the class is not the same.
Regards,
You should use "Integracja sklepu przez plik integracyjny".
I checked what is in Order->addWs() and before add order should be created customer, and cart.
When creating Order you need to set and pass:
module -> need to be name of installed payment module
id_customer
id_cart
total_paid
payment
I'm using codeception and I'm trying to run the migration for the test database.
From inside the tests folder I run the command
php codeception/bin/yii migrate/up --interactive=0
but I'm getting the error
Exception 'yii\base\InvalidConfigException' with message 'The configuration for the "user" component must contain a "class" element.'
in /www/shopboxyii-v2/vendor/yiisoft/yii2/di/ServiceLocator.php:205
Stack trace:
#0 /www/shopboxyii-v2/vendor/yiisoft/yii2/di/ServiceLocator.php(261): yii\di\ServiceLocator->set('user', Array)
#1 /www/shopboxyii-v2/vendor/yiisoft/yii2/base/Component.php(180): yii\di\ServiceLocator->setComponents(Array)
#2 /www/shopboxyii-v2/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\Component->__set('components', Array)
#3 /www/shopboxyii-v2/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(yii\console\Application), Array)
#4 /www/shopboxyii-v2/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#5 /www/shopboxyii-v2/vendor/yiisoft/yii2/console/Application.php(89): yii\base\Application->__construct(Array)
#6 /www/shopboxyii-v2/tests/codeception/bin/yii(25): yii\console\Application->__construct(Array)
#7 {main}
Does anyone know anything about this error or what's causing it??
You don't need the user component configuration in the console/config/main.php (if using advanced-app) or app/config/web.php (if using basic-app), you should just remove the component configurations and it will start working seamlessly.
We are getting an error when running a query job on BigQuery :
'message' => 'Request timed out. Please try again.',
'reason' => 'timeout',
'location' => 'script'
We will be running it again as it requested, but since it takes 1/2 hour for it to time out, it would be helpful if we knew what the problem is so we can avoid it.
Specifically:
What does "script" mean in this context? Is it the SQL-query or one
of the UDFs? (the query calls 3 UDFs).
The exact same query failed twice already with "internal error". The "request timed out" was its 3rd attempt at mocking us. Any correlation between the two error types?
It would be really helpful to receive more detailed information on what failed to work, so that we can track it down.
In my logs I have one Facebook API exception and I don't find any information about it. Anybody knows this?
The Exception is:
[error] => Array
(
[message] => Unable to get 'r' connection to tier cdb.dfs
[type] => DataLayerException
)
I am trying to athenticate from the elgg local server.
by refering
http://www.danielansari.com/wordpress/2008/12/how-to-use-the-rest-api-in-elgg-11/
I am getting following error:
Status: **** ERROR (-1) ****
Message: Method call 'login' has not been implemented.
Result: exception 'APIException' with message 'Method call 'login' has not been implemented.' in C:\xampp\htdocs\elgg1.6.1\engine\lib\api.php:562
Stack trace:
#0 C:\xampp\htdocs\elgg1.6.1\services\api\rest.php(46): execute_method()
#1 C:\xampp\htdocs\elgg1.6.1\engine\lib\api.php(1219): include('C:\xampp\htdocs...')
#2 C:\xampp\htdocs\elgg1.6.1\engine\lib\pagehandler.php(42): api_endpoint_handler('login', Array, '')
#3 C:\xampp\htdocs\elgg1.6.1\engine\handlers\pagehandler.php(23): page_handler(Array, 'api')
#4 {main}
Basically my aim is to upload an image in a community made by using ELGG. But In this place only I am stuck.
How to solve it?
Well, I can't help you with that exception, but I can tell you that there is no way directly in Elgg's REST API to upload an image. I tried doing this and had to replicate the logic of the upload.php action in my own huge honking function.