Skip to content

Credentials - Authentication Management

A secure storage system for authentication data such as API keys, tokens, passwords, and database connections. Credentials are stored encrypted in the database and loaded on demand by modules that need authentication with external services. They are stored in the servicecredentials table.


  • They are created and managed from the administration panel.
  • They are stored as JSON in the credentials column of the servicecredentials table.
  • Modules load them via getCredentials(config.credentials_id).
  • The identifier can be numeric (ID) or string (service_name).
  • Each credential is associated with a client_id.

For services such as OpenAI, Telegram, among others:

{ "apiKey": "sk-xxxx..." }

For HTTP, REST APIs:

{ "username": "user", "password": "pass123" }

For Shopify, Amazon, Google, among others:

{ "access_token": "token_xxx", "refresh_token": "refresh_xxx" }

For PostgreSQL, MySQL, MSSQL, Oracle:

{
"host": "db.example.com",
"port": 5432,
"user": "admin",
"password": "secret",
"database": "mydb",
"ssl": true
}

For SendMail:

{
"host": "smtp.gmail.com",
"port": 465,
"secure": true,
"auth_user": "user@gmail.com",
"auth_pass": "app_password"
}

For Slack:

{ "webhookUrl": "https://hooks.slack.com/services/xxx", "username": "Bot" }

For Telegram:

{ "botToken": "123456:ABC-DEF..." }

For Shopify:

{
"shop_domain": "mitienda.myshopify.com",
"access_token": "shpat_xxx..."
}

For WooCommerce:

{
"url": "https://mitienda.com",
"consumer_key": "ck_xxx",
"consumer_secret": "cs_xxx"
}

In the visual editor, the credentials_id field displays a selector of available credentials. The module’s metadata.json file defines the field with "type": "credentials". Optionally, "provider": "stripe" can be included to filter credentials by service type.

In the module code, they are accessed as follows:

const credentials = await getCredentials(config.credentials_id);
// credentials.apiKey, credentials.host, etc.

  • Never include credentials directly in the node configuration.
  • Always use the credentials_id field to reference stored credentials.
  • Credentials are not exposed in logs or execution traces.
  • Each client has their own isolated credentials via client_id.
  • Rotate tokens and passwords periodically to maintain security.

ServiceRequired FieldsWhere to Obtain Them
OpenAIapiKeyplatform.openai.com/api-keys
Stripesecret_keydashboard.stripe.com/apikeys
TelegrambotToken@BotFather on Telegram
Shopifyshop_domain, access_tokenShopify Admin Panel > Apps
GoogleOAuth2 tokens (automatic)Google Cloud Console
PostgreSQLhost, port, user, password, databaseYour DB server
SMTPhost, port, auth_user, auth_passYour email provider