Important: Always use a sandbox-issued API key for testing and switch to a production-issued API key when moving to live mode. This separation helps prevent accidental use of real data during development.
Every WUPEX API request must include the following HTTP headers:
curl -X POST https://service.wupex.com/api/product/merchant/invited/list \ -H "x-api-key: YOUR_API_KEY" \ -H "Accept-Language: en-US" \ -H "Content-Type: application/json" \ -d '{"page":1,"pageSize":20}'
Use environment variables or secret managers (e.g., AWS Secrets Manager, Vault). Avoid hard-coding or committing keys to source code.
Keep API keys only on server-side. Calls from client apps (JS, mobile) risk exposing your keys to end users
Rotate every 30–90 days and immediately revoke any leaked or unused keys
Placing x-api-key in headers is safer and aligns with HTTP best practices, avoiding exposure in logs or caches
For advanced integration and observability, include headers like:
X-Request-ID or X-Trace-ID for tracking across microservices.
CORS or proxy-specific headers if needed.
Node.js (Fetch):
fetch(`${baseUrl}/api/product/merchant/invited/list`, { method: "POST", headers: { "x-api-key": process.env.WUPEX_API_KEY, "Accept-Language": "en-US", "Content-Type": "application/json" }, body: JSON.stringify({ page:1, pageSize:20 }) });
import requests headers = { "x-api-key": os.getenv("WUPEX_API_KEY"), "Accept-Language": "en-US", "Content-Type": "application/json" } resp = requests.post(f"{base_url}/api/customer/balance", headers=headers)
HttpRequest req = HttpRequest.newBuilder() .uri(URI.create(baseUrl + "/api/order/list")) .header("x-api-key", apiKey) .header("Accept-Language", "en-US") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString("{...}")) .build();
Say goodbye to delays, fraud, and complex setups—our solution is built for speed and trust.
Copyright © 2024 WUPEX | All Rights Reserved.