1

I want to use the same asana user account to integrate a html form on a website to create tasks in a specific project in asana.

I have been successful in authenticating using one browser (it takes me to the asana login where I just put in my details) and then it's all good.

But if I want this integration to take place in the background of a form submission, I want to use the same account to authenticate (ie. when anyone submits a webform I want it to create a task in the project specified using the account I have setup).

I have looked at https://asana.com/developers/documentation/getting-started/auth and it doesn't look like there is a way to authenticate without sending the user to the login page or is there? I also had a look in the github php client examples and can't see to figure it out through them either.

Basically is there a way to authenticate without having to go through login form in a webpage?

Thanks.

farse311
  • 53
  • 4

1 Answers1

1

Yes, you can do this through the token exchange endpoint. https://asana.com/developers/documentation/getting-started/auth#token-exchange. Once the user has been authenticated you can store a refresh token which then can be used to get further access/bearer tokens to access the API.

farse311
  • 53
  • 4
  • This could work, but does that mean I need to store the code that is returned the first time? I notice that the same auth call stops you for user input one time and then just keeps working after that. – garek007 May 17 '22 at 20:49