Signing (SDK-HMAC-SHA256)
Every business API request must be signed with this process. A ready-to-run signing script for cURL is in the HTTP API quick start.
Algorithm
Steps
1. Build the canonical request
Rules:
HTTPMethod: uppercase, such asGETorPOST.CanonicalURI: the URL path, with a trailing/added if missing.CanonicalQueryString: sort by decoded key, then re-encode askey=value&.... Follow Python'sparse_qsandurlencode(..., doseq=True): drop empty values, keep the order of values for repeated keys, and encode spaces as+.CanonicalHeaders: onelowercase(name):trim(value)line per header, sorted by header name and separated by a single newline. The last line is also followed by a single newline beforeSignedHeaders.SignedHeaders: the names of the signed headers, lowercase, sorted, and separated by;.HashedRequestPayload:hex(sha256(body)). If the request has anX-Sdk-Content-Sha256header, use its value instead.
2. Build the string to sign
Algorithmis alwaysSDK-HMAC-SHA256.RequestDateTimeis the value ofX-Sdk-Date.
3. Compute the signature
Encode the SK as UTF-8 bytes and use them directly as the HMAC key.
4. Build the Authorization header
Minimal Python implementation
Fixed-input test
Use POST https://wapi-skill.vmake.ai/skill/config.json with the body {"gid":"","supported_schemas":["v2"]} (no trailing newline) and the headers Host: wapi-skill.vmake.ai and Content-Type: application/json. Set the AK and SK to example-ak and example-sk, and add X-Sdk-Date: 20260101T000000Z to the two headers you pass in. The released signer produces the result below, which you can compare locally. Use the current UTC time when you send real requests.
Tips
- If signing fails, check your signer against the fixed input above, then compare the newlines, trailing slash, and query order in CanonicalRequest and StringToSign with the reference implementation character by character.
- Every header in
SignedHeadersmust be sent with the request, with the same value used for signing. Compute the signature before addingAuthorization. - Do not include
Content-Lengthin SignedHeaders. Let the HTTP client handle it.