Custom auth header for oauth2

Hi,
I setup oauth2 credentials for Zoho Mail, this worked very easy.
But I discovered instead of sending a Bearer token Zoho wants me to send the token with the prefix Zoho-oauthtoken instead of Bearer. Is there a way to do this?

Thanks,
Lukas

If the default zoho auth needs to be updated, you can do this with manual headers.

But we just integrated with zoho last week, even with custom HTTP nodes, it still worked. But we are 3 small updates behind so this may have changed.

Actually I checked, we used HTTP custom oauth rather than zoho oauth connection, and made http request nodes. We needed custom endpoints, so maybe the default nodes need updating.

Do you have any specifics on errors, do the zoho nodes not work?

Thanks for your reply!

To be clear I am not using the integrated Zoho CRM oauth2.
I also tried to overwrite the header auth but seems like the auth header is merged and the one from the oauth has higher prio. I dont think that Zoho’s api changed the needed Zoho-oauthtoken recently.

I get INVALID_OAUTHTOKEN if I call the zoho api, because of the missing Zoho-oauthtoken.

I am not sure what you mean by custom oauth.
I did the following:

  • For Authentication choose Generic Credential Type
  • For Generic Auth Type choose OAuth2 API
  • For OAuth2 API I created my custom oauth2 zoho (which is working, as I saw the token)

Interesting, yes, we use the same setup.

Could you show your credential page (blur/remove half of keys to prevent issues)?

Can you provide more details from the error output?

Could you provide the http node setup/screenshot?


When I call https://mail.zoho.com/api/accounts I get this:

404 - "{\"data\":{\"errorCode\":\"INVALID_OAUTHTOKEN\"},\"status\":{\"code\":404,\"description\":\"Invalid Input\"}}"

When I just check whats beeing send out from the oauth handling with webhook.site I see authorization Bearer XXXXX

BTW: My n8n instance is self-hosted, if that matters.

I actually called the wrong api endpoint, as I am based in eu, I need to call .eu not .com. Its working now.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.