Having a hard time creating a task with the API

Hi there,

I’m having some problems add a task to Asana using a fetch method call in Javascript. I can go ahead and get information from Asana just fine, but I’m not able to post any new tasks. I just get a 400 error.

I recently asked a question about this on stack overflow, so you can find all the relevant details and code over there: Posting an Asana task using fetch - Stack Overflow

Wondering if anyone here has some insight into this or can give me any help. Thanks!

1 Like

Hi @Frank_Goodman,

I haven’t personally tried using the API without the help of the libraries provided by Asana. As I was too busy with other stuff, I didn’t have time to learn how to do it manually. :smile: What I am sure is that the libraries do work and are relatively simple to use since I don’t have to tinker with the URLs myself.

As per checking, you are most likely using Javascript. Have you tried using the Javascript library?
You can find the libraries here:


Tagging @Matt_Bramlage, our Asana API expert, who can hopefully provide some guidance!

Thanks @LenSantos! I’m trying to avoid adding the client library as a dependency here. It just feels like a lot to replace the straight forward implementation I have in place now (I’m also unsure it would work with Redux Saga). Though, admittedly it would be a lot more straight forward if my code actually worked!

This is mainly a learning exercise for me, so I’m really interested in learning why this isn’t working.

Are you able to take a look at this @Matt_Bramlage? I’d appreciate it!