React Router

Credentials Management

Securely store and reuse API keys, tokens, and authentication credentials

Credentials Management

The Loopi Credentials Management system provides a secure way to store and reuse API keys, secrets, and authentication tokens across your automations.

Overview

Instead of entering API credentials manually for each automation step, you can save them once in the Credentials Manager and reference them across multiple steps and automations.

Features

  • Encrypted Storage: All credentials are encrypted using AES-256-CBC encryption before being saved to disk
  • Multiple Credential Types: Support for Twitter, OAuth 2.0, API Keys, Basic Auth, and Custom credentials
  • Reusable: Use the same credential across multiple automation steps
  • Secure: Credentials are never exposed in logs or UI (shown as ••••••••)
  • Easy Management: Add, edit, and delete credentials from the Settings page

Credential Types

Twitter/X

Store Twitter API v2 credentials for posting tweets, sending DMs, searching, etc.

Required fields:

  • API Key
  • API Secret
  • Access Token
  • Access Token Secret

OAuth 2.0

Generic OAuth 2.0 credentials for third-party services.

Required fields:

  • Client ID
  • Client Secret
  • Redirect URI

API Key

Simple API key authentication.

Required fields:

  • API Key
  • API URL (optional)

Basic Auth

Username and password authentication.

Required fields:

  • Username
  • Password

Custom

For custom authentication schemes not covered by the above types.

Using Credentials

Adding a Credential

  1. Go to Settings → Credentials tab
  2. Click "Add Credential"
  3. Enter a descriptive name (e.g., "My Twitter Account")
  4. Select the credential type
  5. Fill in the required fields
  6. Click "Add Credential"

Using in Automation Steps

  1. When configuring a Twitter step (or other step that supports credentials)
  2. You'll see an "Authentication" section
  3. By default, you can select from your saved credentials
  4. Click "Enter Manually" to switch to direct input if needed
  5. Select your saved credential from the dropdown
  6. The step will automatically use those credentials during execution

Editing Credentials

  1. Go to Settings → Credentials
  2. Click "Edit" on the credential you want to modify
  3. Update the fields (all fields are shown, even if stored as •••••••)
  4. Click "Save Changes"

Deleting Credentials

  1. Go to Settings → Credentials
  2. Click the trash icon on the credential you want to remove
  3. Confirm deletion

⚠️ Warning: Deleting a credential will cause any automation steps using it to fail. Make sure to update those steps first.

Security

Encryption

Credentials are encrypted using:

  • Algorithm: AES-256-CBC
  • Key Derivation: PBKDF2 with 100,000 iterations
  • Random IV for each encryption operation

Storage Location

Encrypted credentials are stored in:

<userData>/credentials.json.enc

User Data Locations:

  • Linux: ~/.config/loopi/credentials.json.enc
  • macOS: ~/Library/Application Support/loopi/credentials.json.enc
  • Windows: %APPDATA%\loopi\credentials.json.enc

Best Practices

  1. Use descriptive names: Name credentials clearly (e.g., "Production Twitter API" vs "Test Account")
  2. Rotate credentials regularly: Update API keys and tokens periodically for security
  3. Don't share automations with embedded credentials: Use credential references instead
  4. Backup carefully: If backing up automations, be aware that credentials are stored separately
  5. Revoke unused credentials: Remove old or unused credentials from both Loopi and the API provider

Integration Examples

Twitter Automation

  1. Add Twitter credential:

    • Name: "My Twitter Account"
    • Type: Twitter/X
    • Fill in API keys from Twitter Developer Portal
  2. In automation, add Twitter step:

    • Step: "Create Tweet"
    • Authentication: Select "My Twitter Account"
    • Tweet text: "Hello from Loopi!"
  3. Run automation - credentials are used automatically

API Integration

  1. Add API Key credential:

    • Name: "OpenWeather API"
    • Type: API Key
    • API Key: Your key
    • API URL: https://api.openweathermap.org/data/2.5/
  2. In automation, use API Call step:

    • Method: GET
    • URL: {{credentials.apiUrl}}weather?q=London&appid={{credentials.apiKey}}
    • Store in: weatherData

Troubleshooting

Credential not appearing in dropdown

  • Make sure you've saved the credential successfully
  • Check that the credential type matches the step (e.g., Twitter credentials for Twitter steps)
  • Try restarting the application

Authentication fails

  • Verify credentials are still valid at the API provider
  • Check that all required fields are filled
  • Ensure API permissions are correctly set
  • Test credentials manually first

Can't edit or delete credential

  • Close any automations currently using the credential
  • Try restarting the application
  • Check file permissions on the credentials file

API Provider Setup Guides

Twitter API Credentials

  1. Go to Twitter Developer Portal
  2. Create a new app or select an existing one
  3. Navigate to "Keys and tokens" tab
  4. Generate/copy:
    • API Key (Consumer Key)
    • API Secret (Consumer Secret)
    • Access Token
    • Access Token Secret
  5. Ensure app has Read, Write, and Direct Messages permissions
  6. Add credentials to Loopi

GitHub Personal Access Token

  1. Go to GitHub → Settings → Developer settings → Personal access tokens
  2. Click "Generate new token"
  3. Select required scopes (e.g., repo, user)
  4. Generate and copy the token
  5. Add as "API Key" type credential in Loopi

Generic OAuth 2.0

  1. Register your application with the API provider
  2. Obtain Client ID and Client Secret
  3. Configure redirect URI (typically http://localhost:3000/callback)
  4. Add as "OAuth 2.0" credential in Loopi
  5. Follow provider's authentication flow