quicktask icon indicating copy to clipboard operation
quicktask copied to clipboard

Doesn't work with new Asana API "Personal Access Token"

Open mannieschumpert opened this issue 8 years ago • 7 comments

mannieschumpert avatar Dec 18 '16 21:12 mannieschumpert

It does work with the new Personal Access token. Using Alfred 3, after changing the calls to Alfred 2 directories in workflow.php to the Alfred 3 directories, a personal access token functions fine with this workflow.

therealscottcarlow avatar Mar 13 '17 21:03 therealscottcarlow

I can confirm what @therealscottcarlow suggested, I just set it up with the personal access token and it works fine.

Check the resolution of this issue to change the calls from Alfred 2 to Alfred 3.

dan300 avatar Mar 15 '17 11:03 dan300

@mannieschumpert Was there a particular issue you were having that you hadn't the time to troubleshoot? I'd be happy to see if I can reproduce it. All's green over here, though.

There are some changes you should probably make, though, because Asana's going to stop supporting basic auth at some point. The new way Asana wants you to pass the token in the Authorization header. e.x.:

curl -H "Authorization: Bearer <Personal_Access_Token>" https://app.asana.com/api/1.0/users/me.

I'll submit a PR when I have the chance. I won't submit a PR for the Alfred 2 directory references, though, because that will break compatibility with Alfred 2. I'll let you figure out how you want to handle organizing that in your Github first.

@dan300 Glad that worked for you. Thanks for confirming.

therealscottcarlow avatar Mar 15 '17 12:03 therealscottcarlow

Mine just stopped working so I quickly fixed it by changing all occurrences in asana.php to:

exec('curl -H "Authorization: Bearer' . $apikey . '" https://app.asana.com/api/1.0/users/me', $return);

And filling in the personal access token into akey.

It is late and I really needed to get this to work again quickly. If there's interest I can submit a cleaned up change.

alper avatar Jun 04 '17 22:06 alper

@alper Would be really grateful if you could fix and update the core files. Use it all the time!

rogiervw avatar Jun 07 '17 09:06 rogiervw

Just stopped working for me, but I generated a Personal Access Token and filled it into akey and everything is working again. No code changes necessary. Evidently the PAT's work as a drop-in replacement for the API Key!

ialexryan avatar Jun 09 '17 18:06 ialexryan

Thanks @ialexryan - works perfect!

rogiervw avatar Jun 12 '17 07:06 rogiervw