"No route found" error with Asana Connect

207 Views Asked by At

As per this, I'm trying to use the code received from the authorization endpoint to exchange for a token, using the Authorization Code Grant flow. I first issue this call:

https://app.asana.com/-/oauth_authorize?response_type=code&client_id=123468022031234&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&state=foo

(I admit I don't know how the 'state' param should be used - the documentation doesn't clarify this, and it's required; also, my app is not web-based so the value for the redirect URL is auto-generated on the Developer App Management page for my app)

That gives me this code (slightly obfuscated): 0/12341234fd6ccf6d168420f7f8600c93

Which I then use for this call:

https://app.asana.com/-/oauth_token?grant_type=authorization_code&client_id=123468022031234&client_secret=1234123442d5048f64ac39ca857ec57a&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&code=0%2F12341234fd6ccf6d168420f7f8600c93

Which unfortunately returns "No route found" instead of the token I need. What am I doing wrong?

1

There are 1 best solutions below

0
On

It has to be a POST. I was using a GET call.