Basic Auth
A Basic Auth connection sends a username and password with every request, using HTTP Basic authentication.
This page is about HTTP APIs. For database, SFTP and mail server logins, use the matching app instead (PostgreSQL, MySQL, SQL Server, SFTP, IMAP, SMTP); see Database, SFTP and email connections.
Fields
| Field | Key | Description |
|---|---|---|
| Username | username | The username |
| Password | password | The password. Use secret stores a secret://NAME reference instead |
How it works
Blokkio joins username:password, encodes it as UTF-8 and base64, and sets the header:
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Don't set your own Authorization header on the node when you use the connection.
Setting it up
- Go to Apps, open Any REST API on the Generic tab and click Connect → Basic Auth. Alternatively, create a custom app with the Basic Auth auth strategy: it lets you set a base URL, allowed domains and a test request.
- Enter a name, the username and the password, and click Create.
- Select the connection in an HTTP Request node (Auth → Use Connection).
When to use it
Use Basic Auth when an API requires HTTP Basic authentication, which is common for older and internal services. For modern APIs, prefer Bearer Token or OAuth 2.0.