Authentication
Every request must include three custom headers.
1. Obtain Your Credentials
- Log in to your WiseSub Dashboard.
- Click your profile icon → Developer API.
- Click + Generate New API Key and enter a name (e.g., “My App”).
- You will receive:
- API Key – public identifier (starts with
WS_) - API Secret – private token. Shown only once. Copy and store securely (like a password).
- API Key – public identifier (starts with
⚠️
Important – Your API secret is never retrievable after you close the modal. If lost, regenerate it.
2. Headers for Every Request
| Header | Value | Description |
|---|---|---|
Authorization | Bearer YOUR_API_KEY | Your API key |
X-API-Secret | YOUR_API_SECRET | Your secret |
X-Environment | test or live | test = sandbox (no real money); live = production |
Accept | application/json | Always required |
Example Headers
Authorization: Bearer WS_abc123456789
X-API-Secret: supersecret123
X-Environment: test
Accept: application/json3. Regenerating a Secret
- Go to Developer API in your dashboard.
- Click Regenerate Secret next to your key.
- Confirm your account password.
- Copy the new secret immediately – the old one becomes invalid.
4. Security Best Practices
- Never commit your API secret to version control.
- Use environment variables in your backend.
- Rotate your secret periodically.
- Use the test environment for development and testing.