Get Your Authentication Token

OneLiquidity uses JWT (JSON Web Token) authentication to secure API requests. Unlike simple API keys, our tokens are programmatically generated, can be IP-restricted, and have configurable expiration dates for enhanced security.

Step 1: Create Your Account

  1. Visit oneliquidity.com and click "Sign Up"
  2. Fill in your details:
    • Email address
    • Password
    • Business information
  3. Submit the registration form

Step 2: Verify Your Email

After registration, you'll receive an email with a verification link.

  1. Check your inbox for an email from OneLiquidity
  2. Click the verification link
  3. Your email is now verified and ready to generate tokens

💡

Sandbox vs Production: After email verification, you can immediately start using the staging environment. For production access, our team needs to activate your account first.


Step 3: Generate Your Authentication Token

Once your email is verified, you'll generate a secure JWT token programmatically using the API.

View full API documentation: Generate Authentication Token →

Quick Overview:

Make a POST request to generate your token:

curl --request POST \
  --url https://sandbox-api.oneliquidity.technology/auth/v1/token \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
    "email": "[email protected]",
    "expiresAt": "30D"
    }'

Required Parameters:

  • email - Your verified email address
  • expiresAt - Token expiration (1D, 7D, 30D, 60D, or YYYY-MM-DD)

Optional Parameters:

  • whitelistedIps - Array of IP addresses for additional security

Step 4: Receive Your Token via Email

After making the request:

  1. Check your email inbox
  2. You'll receive an email with your JWT authentication token
  3. Copy this token - you'll use it in all API requests (as a bearer token)

⚠️

Important: The token itself is delivered via email for security. Store it securely - treat it like a password.


Token Configuration Options

Expiration Settings

You can set when your token expires using expiresAt:

Predefined durations:

  • 1D - Token expires in 1 day
  • 7D - Token expires in 7 days
  • 30D - Token expires in 30 days (recommended)
  • 60D - Token expires in 60 days

Specific date:

  • 2024-12-31 - Token expires on December 31, 2024 (must be within 1 year)

IP Whitelisting (Optional but Recommended)

Restrict your token to specific IP addresses for extra security:

{  
  "email": "[[email protected]](mailto:[email protected])",  
  "expiresAt": "30D",  
  "whitelistedIps": [  
    "203.0.113.45",  
    "198.51.100.0"  
  ]  
}

💡

Tip: Start without IP restrictions during development, then add them for production.


Token Management

Token Limits

  • Maximum 5 active tokens at a time
  • Must delete old tokens before creating new ones
  • Each token is independent with its own expiry

Managing Your Tokens

View all tokens:

Delete a token:

Refresh/Reset a token:


Expiry Reminders

OneLiquidity automatically sends email reminders before your tokens expire, so you'll never be caught off-guard.


Security Best Practices

Do:

  • Store tokens in environment variables (process.env.OL_TOKEN)
  • Use shorter expiry times (7D or 30D) in production
  • Enable IP whitelisting for production tokens
  • Delete unused tokens immediately
  • Rotate tokens regularly

Don't:

  • Commit tokens to version control (add to .gitignore)
  • Share tokens across multiple team members
  • Use tokens with no expiration in production
  • Log full tokens in application logs

What's Next?

Now that you have your authentication token, you're ready to make your first API call!