Skip to main content

Overview

The deployERP API uses Bearer token authentication. All API requests must include a valid API key in the Authorization header. This guide covers authentication setup, best practices, and troubleshooting.

Authentication Methods

API Keys

Long-lived tokens for programmatic access

OAuth 2.0

Coming soon: OAuth flow for third-party apps

API Key Management

Creating API Keys

Generate API keys from your dashboard:
1

Navigate to API Settings

Go to Settings → API Keys in your dashboard
2

Create New Key

Click Generate New API Key
3

Configure Permissions

Select required permissions for the key
4

Set Expiration

Choose expiration date (optional)
5

Save Key

Copy and securely store the generated key
API keys are shown only once. Store them securely in a password manager or secrets management system.

API Key Format

Key components:
  • dep_ - Prefix identifying deployERP keys
  • live - Environment (live/test)
  • a1b2c3... - Unique key identifier

Using API Keys

Request Headers

Include your API key in the Authorization header:

Environment Variables

Best practice: Store API keys in environment variables:

API Key Permissions

Permission Scopes

Configure granular permissions for API keys:

Permission Examples

Security Features

IP Whitelisting

Restrict API key usage by IP address:

Key Expiration

Set expiration dates for enhanced security:

Rate Limiting per Key

Different rate limits based on key type:

Authentication Errors

Common Error Responses

Error Handling

Implement proper error handling:

Key Rotation

Automatic Rotation

Enable automatic key rotation:

Manual Rotation

Rotate keys programmatically:

Best Practices

  • Never commit API keys to version control
  • Use environment variables or secret managers
  • Encrypt keys at rest
  • Rotate keys regularly
  • Grant minimum required permissions
  • Create separate keys for different purposes
  • Review permissions regularly
  • Remove unused keys
  • Track API key usage
  • Set up alerts for unusual activity
  • Review access logs
  • Monitor failed authentication attempts
  • Name keys descriptively
  • Document key purposes
  • Set expiration dates
  • Use IP whitelisting when possible

Testing Authentication

Test Endpoint

Verify your authentication setup:

Debug Headers

Enable debug headers for troubleshooting:

SDK Authentication

Python SDK

Node.js SDK