API Key Errors

Fixing API Key Problems

Resolve API authentication issues!

__________________________________________________

Error: "Invalid API Key"

Causes:

  • Wrong key entered
  • Extra spaces
  • Copied incompletely
  • Wrong environment

Fixes:

1. Re-Copy Key:

  • Portal.shaloz.com → Settings
  • Copy API key again
  • Select all, copy
  • No extra spaces

2. Paste Carefully:

  • WooCommerce settings
  • Clear old key
  • Paste new key
  • No spaces before/after

3. Match Environment:

  • Sandbox key → Sandbox environment
  • Production key → Production environment

4. Test Connection:

  • Click "Test Connection"
  • Should show success

__________________________________________________

Error: "Unauthorized"

Causes:

  • Using public key where secret needed (rare in plugin)
  • Business ID mismatch
  • Key deleted

Fixes:

  • Regenerate key in Portal
  • Use new key
  • Test connection

__________________________________________________

Error: "Connection Timeout"

Causes:

  • Server can't reach Shaloz API
  • Firewall blocking
  • Network issue

Fixes:

  • Contact web host
  • Ask: "Can server make outbound API calls to api.shaloz.com?"
  • May need to whitelist Shaloz
  • Try again later (temporary)

__________________________________________________

Key Format

Public Key:

  • Starts with pk_
  • pk_sandbox_ for testing
  • pk_live_ for production
  • Used in WooCommerce plugin

Secret Key:

  • Starts with sk_
  • Do NOT use in WooCommerce
  • Server-side only
  • Keep very secret

__________________________________________________

Regenerating Keys

If Lost or Compromised:

1. Delete Old Key:

  • Portal → Settings → API Keys
  • Find old key
  • Click "Delete"

2. Create New Key:

  • Click "Create API Key"
  • Select environment
  • Copy immediately

3. Update WooCommerce:

  • Paste new key
  • Test connection
  • Save settings

__________________________________________________

Multiple Keys

You Can Have:

  • Multiple keys per environment
  • Different keys for different uses
  • Label them clearly

Example:

  • "WooCommerce Sandbox"
  • "WooCommerce Production"
  • "Custom App"

__________________________________________________

Environment Mismatch

Common Mistake:

  • Sandbox key in Production environment
  • Or vice versa

Fix:

  • Match them:
  • Sandbox key → Sandbox environment
  • Production key → Production environment

__________________________________________________

Key Security

If Key Exposed:

  1. Delete immediately
  2. Generate new key
  3. Update all integrations
  4. Monitor for suspicious activity

__________________________________________________

Testing Keys

Simple Test:

  1. Enter key
  2. Select environment
  3. Click "Test Connection"
  4. Should show success
  5. If not: Key wrong or environment mismatch

__________________________________________________

Need Help?

API Key Issues: help.shaloz.com

Can't Generate Key: Contact support

Include: Environment (Sandbox/Production), error message

Was this article helpful? 0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Can’t find what you’re looking for?

Let us help you!

Submit a request
Support Agent