1. Message service access
Xportcn OpenAPI EN
  • English version
    • API Reference
      • Taobao
        • Product
          • Taobao Hot product recommendation
          • Taobao Spus list query interface
          • Taobao Spus Details Query Interface
          • Taobao Product Detail V2
          • Taobao product search API
          • Taobao product image search API
          • Batch query products according to Taobao product id
          • Query product by Taobao product ID
          • Taobao product inquiry
        • Order
          • purchase order page list
          • purchase order cancel
          • purchase order pay
          • purchase order render
          • purchase order create V2
          • purchase order render v2
          • purchase order create
          • Query the order list by page
          • Upload payment voucher
          • Cancel an order
          • Modify order advance information
          • Pay an order
          • Get IM link
          • Get order details based on the order ID
          • Get logistics details
        • After-sale
          • After-sale single-column table query
          • After-sale order rendering interface
          • Return logistics rendering
          • Return logistics submission
          • After-sale order cancellation
          • Submit After-sale order message
          • After-sale order submission
          • After-sale order message list query
          • After-sale order modification
          • After-sale simple query
        • Message callback
          • Order price correction
          • Order status modification callback
          • Order after-sales refund
        • Shopping cart
          • Shopping cart list
          • Add to shopping cart
          • Delete shopping cart item
          • Edit product quantity
          • Generate order preview
          • Create order
      • 1688
        • Product
          • category get
          • Product details query
          • Convert decryption to Wang Wang URL
          • Product keyword query
          • Product image search
          • Shop search
        • Order
          • Preview the data before creating the order
          • Preview data before order creation (batch for different merchants)
          • Create an order
          • Create an order (different merchants)
          • Cancel the order before payment
          • Order payment
          • Buyer confirms receipt of goods
          • Developers submit bulk payment 1688 orders
          • Get logistics tracking information for orders
          • Order list paging query
        • After-sale
          • Find the reason for a refund return (to create a refund return)
          • Upload refund receipt
          • Create a refund return request
          • Buyer submits refund information
          • List of logistics companies - All logistics companies
          • Query the details of the after-sales order
        • Message callback
          • Order price correction
          • Order status modification interface
          • 1688 order after sale refund
        • Shopping cart
          • Shopping cart list
          • Add shopping cart
          • Delete shopping cart items
          • Edit quantity of goods
          • Preview the data interface before creating the order
          • Create an order
      • Basics
        • Get user address information
        • Address added and updated
      • Warehouse logistics
        • Please refer to the estimated overseas freight
        • Order overseas freight preview
        • Create international logistics orders
        • Update domestic logistics information
      • InternationalAlibaba
        • Product
          • productDetailGet
          • productList
        • Order
          • GetOrderList
          • CreateOrder
      • bigMajor
        • 1688BigMajorProduct
          • 1688BigMajorProductDetail
        • AlibabaMajorClientOrderController
          • Order list
          • Order Preview (The preview interface needs to be called before creating an order)
          • Create an order
          • Get order details
        • WarehouseCallbackController
          • 包裹入库回调
      • Poizon
        • Product
          • keyword serch
          • product detail
        • Order
          • PayOrder
          • OrderList
          • CreateOrder
          • OrderPreview
    • Product Documentation
      • Announcement
      • Summarize
      • Beginner's guide
        • Become a developer
        • Obtain the Access Key and Access key
        • Start development
      • API tutorial
        • Development manual
        • Error code
      • Message service access
        • Message access manual
      • Account test
        • 1688 Test account
      • Q&A
        • Merchandise store search screening
  1. Message service access

Message access manual

Access Instructions#

The message service is an active push service launched by the Xport developer platform to improve efficiency, and the push content is currently only open to order-related messages. Based on this push service, the application no longer needs polling API to obtain distribution data, but only needs the open platform to actively push business content to the developer when the business data corresponding to the message changes, and the developer only needs to subscribe to the message in advance and analyze the message content. It should be noted that since the order of messages cannot be guaranteed, some messages need to be synchronized with the OpenAPI query interface. Message access can effectively reduce API call frequency and reduce system pressure.

Subscribe Steps#

Location: Open Platform Application Console - Messaging Service
Steps: Developers can configure a callback URL on the open platform to receive message requests
Login to the Xport Open platform as a developer;
Select the console;
Select the message service;
Enter the callback address and select Verify. If the HTTP 200 status code is returned, the verification is successful.
Select Save.
image.png

Message format#

messageType: indicates the message type
messageBody: indicates the message body
messagePlatform: Message channel 0-Taobao platform 1-1688 platform
timestamp: Message push time
image.png

Mechanism description#

Callback address#

Description: Developers need to provide a message receiving channel, receiving push in the form of HTTPS POST requests.
To use the message service, you need to prepare a callback interface for receiving messages. Perform the following operations:
Use the HTTPS callback address.
After receiving the message, return the HTTP 200 status code to confirm the message signing.
The timeout period is 1000MS.

Retry and compensation#

If the message fails, it will be pushed again half an hour later, with a maximum of 5 retries.
If the system is interrupted for more than five times, obtain data again through related query interfaces.

Message signature#

Description: Data will be transmitted in plain text. For security reasons, the open platform will perform summary signature processing on the message body, and the signature result will be placed in the Authorization field of the POST request header. The signature algorithm is as follows:
#Request signature parameters
Base = "{messageBody}"
Secret = "{AccessSecret}"
#Signature algorithm
HMAC-SHA256
#Generate signature
Authorization = HEX_ENCODE(HMAC-SHA256(Base, Secret));
Java signature code reference:
image.png
image.png

Handling Suggestions#

After receiving the message, verify the signature to prevent external attacks, and do not convert or modify the original message body when signing! Otherwise, signature matching will be inconsistent.
Note: messageBody is a string.
Because the interface response time is limited (within 1000ms), the message can be stored in the asynchronous queue for service processing.
修改于 2024-08-16 08:57:06
上一页
Error code
下一页
Account test
Built with