API authentication - oauth 2.0

Guys, I have a practical question regarding authentication and API calling. I want to make a query in this API that uses oauth 2.0 type authentication. However, I don’t know how to do it on n8n. Can someone detail me using this API?

https://www.gov.br/conecta/catalogo/apis/consulta-cnpj/swagger_cnpj.json/swagger_view#section/Authentication/OAuth2

Can anyone help me with this?

Hey @Guilherme_Hirsch,

Have you already tried using the oauth credential type we provide and what error did you see? A look at the doc shows it might need a custom header so you may need to create your own oauth flow using http request nodes.

Sadly though this is not something I have an example for and I don’t have a test account for the service you are working with.

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