'Not Authorized' on batch tasks update

Hi!
I receive ‘Not Authorized’ error on batch task update via API. Submit parallel requests

  1. This error shows up only when I use OAuth token. It works with personal token, but I need only OAuth.
  2. Token is not expired - same OAuth token works well, when I use update of certain task Update a task
  3. Same problem here - Import to update existing tasks - #143 by DougB
    Example request:
curl --request POST \
     --url https://app.asana.com/api/1.0/batch \
     --header 'accept: application/json' \
     --header 'authorization: Bearer ****' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "actions": [
      {
        "method": "put",
        "data": {
          "name": "test22"
        },
        "relative_path": "/tasks/******"
      }
    ]
  }
}
'

Response:

{
  "data": [
    {
      "body": {
        "errors": [
          {
            "message": "Not Authorized",
            "help": "For more information on API status codes and how to handle them, read the docs on errors: https://developers.asana.com/docs/errors"
          }
        ]
      },
      "status_code": 401,
      "headers": {
        "keys": [],
        "as_tuples": [],
        "empty": true,
        "traversable_again": true
      }
    }
  ]
}
1 Like

@Dmitry_Uskov Earlier today we’ve identified an issue that I believe is causing this behavior. This is due to a bug on our end. Please see Ongoing OAuth app degradation when making batch requests. We apologize for the inconvenience.

3 Likes