Trying to create an oAuth2 credential with Basic Token on Header


I’m trying to setup a credential for a service called Hotmart using the n8n generic oAuth2 credential.

They have a documentation for the oAuth2 authentication but I couldn’t figure out how to use this:

–header ‘Authorization: Basic :basic’

As they give me not only the Client ID and Secret but also this Basic token.

Is it possible to make this work?

Hi @vgallotti, welcome to the community!

I can’t think of a way to make this exact request work with n8n’s OAuth2 credentials. It sounds like they’re combining OAuth2 with basic authentication.

So I think to implement this in n8n you would need to build the required HTTP Request manually using the respective node. Something like this should do the job, although I do not have a Hotmart account myself so can’t try this first hand:

That said, it might be worth checking if the basic authorization header is actually required. If you’re on 0.182.0 you can now pick the “client credentials” grant type for OAuth2 credentials which is used by Hotmart from looking at their docs. So you could easily try out if this works fine without the basic token.


Thanks for your tip!

I just updated my n8n and changed the Grant Type to Client Credentials and It worked! Just with the Client ID and Client Secret.

I feel like this update was made just for me :joy:

1 Like

Awesome, I am glad to hear that! Thanks so much for confirming :slight_smile:

1 Like