Hey,
We have had a perfectly working integration with the API for a few years now and suddenly yesterday, we started receiving ‘No Authorization’ errors when creating tasks, adding tags or creating subtasks. The issue is that it seems completely random. I execute the same code and sometimes it creates the task but fails when adding the tag(s), sometimes it creates the task, adds the tags and creates 4 sub tasks before failing, other times it creates 9 subtasks before failing. I definitely have a valid token (evidenced by the fact that I can create the task in the first place) and there is nothing in the code/task/sub-task itself causing it because otherwise, it would consistently fail at the same point.
401 error looks like: (example of it failing what adding a tag to a task)
{“errors”:[{“message”:“Not Authorized”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: xxxx/docs/errors”}]} [headers] => Httpful\Response\Headers Object ( [headers:Httpful\Response\Headers:private] => Array ( [date] => Wed, 19 Oct 2022 16:08:45 GMT [content-type] => application/json; charset=UTF-8 [content-length] => 181 [connection] => keep-alive [server] => nginx [cache-control] => no-store [pragma] => no-cache [x-frame-options] => DENY [x-xss-protection] => 1; mode=block [x-content-type-options] => nosniff [content-security-policy] => report-uri xxxxxxcsp_report?report_only=false;default-src ‘none’;frame-src ‘none’;frame-ancestors ‘none’ [x-asana-api-version] => 1.0 [asana-change] => name=new_project_templates;info=xxxxxx/t/a-new-api-for-project-templates/156432 [x-robots-tag] => none ) ) [raw_headers] => HTTP/1.1 401 Unauthorized Date: Wed, 19 Oct 2022 16:08:45 GMT Content-Type: application/json; charset=UTF-8 Content-Length: 181 Connection: keep-alive Server: nginx Cache-Control: no-store pragma: no-cache X-Frame-Options: DENY X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Content-Security-Policy: report-uri xxxxx/csp_report?report_only=false;default-src ‘none’;frame-src ‘none’;frame-ancestors ‘none’ X-Asana-Api-Version: 1.0 Asana-Change: name=new_user_task_lists;info=xxxxx/t/update-on-our-planned-api-changes-to-user-task-lists-a-k-a-my-tasks/103828 Asana-Change: name=external_goal_metrics;info=xxxxxx/t/changes-to-goal-metrics-progress-sources/221257 Asana-Change: name=new_project_templates;info=xxxxxx/t/a-new-api-for-project-templates/156432 X-Robots-Tag: none [request] => Httpful\Request Object ( [uri] => xxxxxxx/tasks/1203201504120948/addTag [method] => POST [headers] => Array ( [content-type] => application/json [X-Asana-Client-Lib] => version=0.5.0&language=PHP&language_version=7.2.24-0ubuntu0.18.04.13&os=Linux&os_version=4.15.0-192-generic [Authorization] => Bearer xxxx
If anyone has any ideas about how I can troubleshoot this, I would be super grateful.
thanks so much