Asana API Project Update Error "write_access_failure"

I have used “projects.updateProject” API in my Node js app to Update Project name with a Project ID when new project added.

      client.projects
        .updateProject(projectGid, {
          name: projectNameWithID,
        })
        .then((result) => {
          ////
        });

Previously this code worked fine and we used it without any problem. few days ago we got “Forbidden Error” when this project Update code. Then I tried asana API reference Update a project to test API. In there I got this error

{
“errors”: [
{
“message”: “Must supply either text or html text for status update.”,
“help”: “For more information on API status codes and how to handle them, read the docs on errors: Errors
}
]
}

Previously this api didn’t ask for status data.

However I have added status data to the api call and retried then I got this error.

{
“errors”: [
{
“error”: “write_access_failure”,
“message”: “You do not have permission to perform that action.”,
“user_message”: “You do not have permission to perform that action.”,
“help”: “For more information on API status codes and how to handle them, read the docs on errors: Errors
}
]
}

This happens only in “projects.updateProject” API call. I have “tasks.updateTask” API call in my project and its working fine.

Can you give me guides or any clue about this problem?

You are almost certainly running into this recent breaking change that Asana made:

1 Like

Thank you for your reply. Previously I have used Super Admin User’s PAT to make API call. Is there any way I can use it? Or do I have to use project owner’s PAT to update project?. I’m having trouble because all the users are adding projects and I need to rename them with the project Id once user added a project.

I’m not 100% sure but based on this forum post, I don’t think it will help that your token is for a Super Admin account.

1 Like