Skip to main content
Back to API docs

API authentication

Authenticate Wahdx Connection API Requests

Wahdx Connection API requests use an X-API-Key header. Treat this key like a production credential: store it in a trusted backend, serverless function, or private integration layer, never in browser JavaScript or mobile client bundles. This authentication model keeps publishing requests controlled while giving teams a clear path for backend integrations.

Required header

Send the API key with each server-to-server request. The key should be loaded from your environment variables or secret manager.

const headers = {
  'X-API-Key': process.env.WAHDX_API_KEY
};

Server-side request pattern

Use a backend route, serverless function, or internal worker to call Wahdx Connection. This prevents credentials from being exposed to users.

const API_BASE_URL = 'https://api.wahdx.com';
const API_KEY = process.env.WAHDX_API_KEY;

await fetch(API_BASE_URL + '/api/content/accounts', {
  method: 'GET',
  headers: {
    'X-API-Key': API_KEY
  }
});

Key handling checklist

Secure key handling reduces risk when building social publishing workflows.

  • Store API keys in server-side environment variables.
  • Never place API keys in browser code, public repositories, or mobile bundles.
  • Rotate keys immediately if a key is exposed.
  • Route client actions through your backend or server-side proxy.

FAQ

Common questions about this API topic.

Can I use the API key directly from the browser?

No. API keys should only be used from trusted server-side environments so they are not exposed to users.

Which header authenticates requests?

Use the X-API-Key header on each request that calls Wahdx Connection API endpoints.

What should I do if my key is leaked?

Rotate the key immediately and remove the exposed value from code, logs, and public history where possible.