1. API Signature Integration
  • API Signature Integration
    • PHP Version
    • JAVA Version
    • Golang Version
  • Alibaba[1688] Open Platform API
    • 1688 Product Search
      • API for Visual Search of Similar Products
        • API for Image upload
        • API for Visual Search of Similar Products
      • API for Product Keyword Search
      • API for Product Detail Search
      • API for Searching Products in a Shop
      • API for 1688 Recommended Products
    • 1688 Business Opportunities
      • API for 1688 Hot Products
      • API for 1688 Hot Keywords
    • 1688 Logistics
      • API for China Domestic Shipping Cost
    • 1688 Category
      • API for Category Search on 1688
    • 1688 Order Manage
      • API for Creating Preview Order
      • API for Creating Formal Order
      • API for Canceling Formal Order
      • API for Querying Order Details
      • API for Confirming Order Receipt
      • API for Retrieving Payment Link
      • API for Auto Payment of Order
    • 1688 Message Service
      • Callback Message Signature Verification Specification
      • Order Created Message
      • Order Price Modification Message
      • Transaction Payment Message
      • Order Delivery Message
      • Logistics Order Status Change
      • Order Receipt Confirmation Message
      • Transaction Completed Message
  • Taobao Open Platform API
    • Taobao Product Search
      • API for Visual Search of Similar Products
        • API for Image upload
        • API for Visual Search of Similar Products
      • API for Product Keyword Search
      • API for Product Detail Search
      • API for Searching Products in a Shop
    • Taobao Logistics
      • API for China Domestic Shipping Cost
    • Taobao Order Manage
      • Product Bunker interface
      • API for Creating Preview Order
      • API for Creating Formal Order
      • API for Canceling Formal Order
      • API for Querying Order Details
      • API for Auto Payment of Order
    • Taobao Message Service
      • Callback Message Signature Verification Specification
      • Order Status Update Message
      • Order Price Change Message
  1. API Signature Integration

Golang Version

This document provides two sets of signature algorithm implementations in Go, fully aligned with the backend Java original signature logic:
1.Universal Parameter Signature: Applicable to GET requests and Form submission interfaces
2.JSON POST Simplified Signature: Applicable to JSON request body interfaces (Recommended)
Important Conventions
MD5 output must be all uppercase
Encoding is uniformly UTF-8
Parameter concatenation does NOT use URL Encode
Only skip parameters with nil values; empty strings "" are included in signature calculation
1. Universal Parameter Signature (GET / Form Parameters)
Algorithm Workflow
1.Remove the sign field from the parameter map
2.Sort the remaining parameters in ascending dictionary order by key
3.Concatenate as key=value&, filtering out key-value pairs where value is nil
4.Append secret={appSecret} to the end of the string
5.Compute MD5 of the concatenated string and convert to uppercase to obtain the signature
Golang Utility Methods
Usage Example
2. POST JSON Simplified Signature (Recommended)
Algorithm Workflow
The JSON request body carries three fixed top-level fields:
{
  "appKey": "AppKey assigned to the client",
  "requestTime": "Timestamp string (seconds/milliseconds)",
  "sign": "Generated signature"
}
Signature Calculation Formula:
sign = strtoupper(md5(appKey + requestTime + appSecret))
Golang Utility Methods
Usage Example
3. Integration Precautions ⚠️
1.Do NOT URL-encode parameters — the original Java logic does not apply encoding; encoding will cause signature mismatch;
2.Numeric parameters should be explicitly converted to strings when possible — 100 and "100" produce different concatenation results;
3.MD5 result must be uppercase;
4.Avoid array parameters when possible. If arrays are necessary, ensure serialization rules are consistent between client and server;
5.Timestamps support both second and millisecond formats — the server-side utility automatically handles both;
6.Never expose the appSecret in plaintext on the frontend.
Previous
JAVA Version
Next
API for Image upload
Built with