Agent Java SDK
Agent Java SDK: Agent Java SDK v0.3.0 integration, examples, parameters and response semantics.
This guide targets Agent Java SDK v0.3.0, Java 8+, and the tagged public contract. Examples run in a partner backend after initializing client in Quick Start.
Documentation baseline: SDK v0.3.0, commit 54aa3c1. Webhook receiving rules additionally follow WEBHOOKS.md at fa6c7b6; this is a documentation-only update, without a new SDK artifact containing warning helper methods.
Version and installation
GitHub hosts source; it does not make these coordinates resolvable from Maven Central. Use the tagged local installation or your approved artifact repository.
What The SDK Covers
Configuration
Obtain the following values from 6MM before integrating.
Production recommendations:
- Use HTTPS for Agent API and webhook endpoints.
- Store
apiSecretin a secret manager, configuration center, or environment variable. - Keep server time synchronized, preferably with NTP.
- Persist all partner order numbers and keep them globally unique.
- Never send
apiSecretto browsers, apps, mini programs, or frontend source code.
Automatic Signing Fields
For signed Agent API calls, the SDK automatically injects:
Signing rules:
- Exclude
sign. - Exclude empty values.
- Sort keys by ASCII order.
- Join as
k=v&k2=v2. - Calculate HMAC-SHA256 hex with
apiSecret.
Array values are serialized as compact JSON before joining the signing payload. For example, platformUserIds signs as ["1188041528"], giving platformUserIds=["1188041528"] in the k=v payload. Preserve the array element order, double quotes and string IDs; do not insert formatting spaces or use Java List.toString() (such as [1188041528]). The SDK handles this serialization automatically.
Normal business code should not calculate signatures or manually set
agentCode, timestamp, nonce, or sign.