Hello,
I’m trying to use the PHP Asana library to make a batch
request but I keep getting an error and I’m not sure what I;m doing wrong.
I simply want to change the name of a task, just for testing, and here is what I have:
require_once 'vendor/autoload.php';
$client = Asana\Client::accessToken(API_KEY);
$data = [
'actions' => [
[
'method' => 'post',
'relative_path' => '/tasks/1198493609235160',
'data' => [
'name' => 'test 123123123'
]
]
]
];
$request = $client->post( '/batch', $data, array('opt_pretty' => 'true' ));
And the error that I’m getting is:
Array
(
[0] => stdClass Object
(
[body] => stdClass Object
(
[errors] => Array
(
[0] => stdClass Object
(
[message] => No matching route for request
[help] => For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors
)
)
)
[status_code] => 404
[headers] => stdClass Object
(
)
)
)
Any ideas what I’m missing here?