Create Task is null with memberships


I using Asana Api for 1 year. But now my app not work. I check documentation and everything is done by documentation.

I found the bug, I have problem with creating task.

If I use memberships in creating task, return is null. Without memberships it is return data about created task.

But with memberships task is created in asana, but return is zero (null) and I cant save asana Id of task.

and my API is creating duplicate task, because I can’t store asana Id of task.

Can you help me. where is the problem?

Thank you.

I haven’t heard of a case where the API returns null but successfully executes the request. Can you post the code you’re using where you include memberships and it returns null?


I use this library in PHP.

My call is simply:
‘workspace’ => $this->mainWorkspaceId,
‘name’ => ‘#’ . $ticket->id . ’ ’ . $ticket->subject,
‘notes’ => $ticket->note,
‘projects’ => [$ticket->project_original_id],
‘assignee’ => $assignUserId,
‘custom_fields’ => $this->createCustomFields($ticket),
‘memberships’ => $memberships

And memberships looks
array (2)
0 => array (2)
project => “883843695194602” (15) section => “883843695194603” (15)
1 => array (2)
project => “895945042804863” (15) section => “895945042804869” (15)

Both projects is with section.
But this solution works well more than 1 year.

But sometimes return of created task is ok with memberships, but sometimes not. I dont know why. Documentaton in this not changed.

Thank you.

Sorry I use this library

Maybe there is bad returing of errors, I don’t know. I do today some debug.