Post project using RESTClient in Mozilla

Hi there,

I’m trying to post a project using RESTClient,
I put in the url: https://app.asana.com/api/1.0/projects?access_token={My personal token}

and in the body:

workspace={MyWorkspaceId}&name=Test

And I have an ERROR 400
“message”:“Could not parse request data, invalid JSON”

What did I wrong?

Regards,

Joaquin

Hi @Joaquin_Gonzalez,

Thanks for reaching out. I’m surprised your auth worked. You should pass your Personal Access Token in the header, not as a URL param. The header key should be Authorization and the value should be Bearer 0/123456789 (with your PAT).

Regarding your error message, make sure you are passing valid JSON in the body of the request. For example, if you want to create a task in a project (POST /tasks), the body could look like this:

{"data": {"projects":[123456789], "name":"Made from RESTClient"}}

I hope that helps!

Thank you very much,
it’s work