Why am I receiving a 401 unauthorized error when using Connect Proxy for an authenticated request to Asana on a custom tool?

This topic was automatically generated from Slack. You can find the original thread here.

Hey @U03EGTE5WC8, I’m currently trying to use the Connect Proxy to make an authenticated request to Asana but getting a 401 unauthorised for a custom tool that I want to implement. I’ve verified that the authentication for the account works with existing Pipedream components (e.g. asana-create-project ), was wondering if this is a problem with the Bearer token being passed in incorrectly or somehow mismanaging the token.

Thanks!

Did you get any more data on the 401 response?

Here’s the full output ```
Error: Status code: 401
Body: {
“errors”: [
{
“message”: “Not Authorized”,
“help”: “For more information on API status codes and how to handle them, read the docs on errors: Errors
}
]
}
❯ Proxy. node_modules/.pnpm/@pipedream+sdk@2.2.0/node_modules/@pipedream/sdk/dist/esm/api/resources/proxy/client/Client.mjs:91:31
❯ fulfilled node_modules/.pnpm/@pipedream+sdk@2.2.0/node_modules/@pipedream/sdk/dist/esm/api/resources/proxy/client/Client.mjs:5:58

the request this comes from is

const response: any = await pd.proxy.get({
        externalUserId: userId,
        accountId: accountId.id,
        url: "https://app.asana.com/api/1.0/workspaces"
      })

we’ve confirmed on our end that both the externalUserId and the accountId work since i can e.g. create tasks and projects with them

Can you give this another try?

sorry, we’re all set now. thanks so much!