Hello Team,
I have tried making an API call with below sample request but its giving Bad Request(Error code:400).
Please find the below API Request and Response details. I have used Oauth authentication with salesforce named credentials as a connection setup.
End Point URL : https://app.asana.com/api/1.0/tasks, Method=POST
API Request:
JSON format: {“data”:{“start_on”:null,“resource_subtype”:“default_task”,“projects”:[“1201175728978789”],“parent”:null,“notes”:“test Asana SF”,“name”:“test”,“liked”:true,“ex”:null,“due_on”:null,“due_at”:null,“completed_by”:null,“completed”:false,“assignee_section”:null,“assignee”:null}}
System.HttpResponse[Status=Bad Request, StatusCode=400]
DEBUG|{“errors”:[{“message”:“Could not interpret {"data":{"start_on":null,"resource_subtype":"default_task","projects":["1201175728978789"],"parent":null,"notes":"test Asana SF","name":"test ","liked":true,"ex":null,"due_on":null,"due_at":null,"completed_by":null,"completed":false,"assignee_section":null,"assignee":null}} as an identifier in {"data":{"start_on":null,"resource_subtype":"default_task","projects":["1201175728978789"],"parent":null,"notes":"test Asana SF","name":"test","liked":true,"ex":null,"due_on":null,"due_at":null,"completed_by":null,"completed":false,"assignee_section":null,"assignee":null}}.”,“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"}]}
Please share your experience and knowledge to help mitigate the above issue.
Thanks,
Priyanka