Generic Credential type: Body Auth?

Describe the issue/error/question

Is there any way to have a generic credential type that includes two key value pairs and sends them as part of the request body:

  • username: <username>
  • password: <password>

The reason I ask is because one of our vendors has a really dumb way of authenticating to their API - they want you to send a POST request with these in the body, which worked when I tested it but it feels insecure to store this in the Node as opposed to a Credential.

I already tried basic & digest auth and neither of them work - so it definitely expects it to be in the request body which sucks.

What is the error message (if any)?

No error, just wondering if there’s a more secure way to do this without storing creds in the request body of the HTTP node

Please share the workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm,, desktop app]:

Hi @joeldeteves, body auth isn’t an authentication method we currently support in the HTTP Request node I am afraid. However, I can see how this might be useful so I shall convert your question into a feature request so you and other users can vote on it.

In the meantime, you could consider using environment variables. This would avoid storing credentials in your workflow. You can read environment variables when needed using an expression such as {{ $env["USERNAME"] }}.


Thank you - I think I’m out of votes! Lol

Turns out there’s an exsting feature request for this it’s here Access saved credentials from "expressions"