API Integration Guidelines
For User-Generated Content (UGC) and Customer-Generated Content (CGC), your application must evaluate dynamic content in real-time. To achieve this, you must integrate a Content Review API directly into your backend architecture.
AppInChina strongly recommends the Alibaba Cloud Content Moderation API due to its high detection accuracy for text, images, videos, and audio in the Chinese market.
Direct Integration Workflow
When integrating the API directly, your engineering team builds the connection, and your internal moderation team handles the review queue.
Here is the standard integration workflow:
1. Account Provisioning
- AppInChina will create an Alibaba Cloud account for your company.
- This account will be strictly limited to Content Moderation functionality to ensure security.
- We will securely provide your engineering team with the necessary AccessKey ID and AccessKey Secret to authenticate your API requests.
2. Backend Integration
- Your backend servers will make API calls to Alibaba Cloud whenever a user attempts to post or send content.
- The API supports scanning text, images, audio, and video.
- Important: API calls must be made from your backend, not directly from the client application, to protect your API keys and prevent tampering.
3. Implementing Risk-Based Routing
When content is scanned by the API, Alibaba Cloud returns specific risk levels. Your backend must be programmed to handle these responses appropriately:
- Without risk (Pass): The content is safe. Your backend should publish the content immediately.
- Low Risk (Review): The content is likely safe but triggered a minor flag. To avoid disrupting the user experience, you should publish the content immediately, but simultaneously flag it in your internal system for manual review.
- Medium or High Risk (Block): The content contains clear violations. Your backend must block the publication immediately and hold the content in a queue for manual review.
4. Manual Review Queue
Because the API will inevitably flag content that requires human judgment, a manual review process must be established for any content flagged as Low, Medium, or High risk. You have two options for handling this manual review queue:
Option A: AppInChina Managed Review (Recommended)
By default, AppInChina's compliance team will handle the manual review of any content flagged by the API.
- Initial Routing: Your backend handles the initial API integration. When content is flagged as Low, Medium, or High risk, your system temporarily blocks or flags the content.
- Forwarding to AppInChina: Your backend must automatically forward the flagged content details (including the
data_id, content payload or URL, and the API's risk label) to AppInChina's moderation system via our designated webhook/API. - Manual Review: Our Chinese-speaking moderation staff will review the forwarded content in the AppInChina admin dashboard and make the final publish/block decision.
- Callback & Resolution: Once a decision is made, our system will send an asynchronous webhook callback to your backend with the final
approvedorrejectedstatus. Your system must listen for this callback to automatically publish the approved content or permanently delete the rejected content.
Option B: Internal Client Review
If your company has a dedicated Chinese-speaking moderation team, you may choose to handle the manual review queue internally.
- You will need to build or configure an internal dashboard/queue where your staff can review flagged content.
- If a "Low Risk" item is manually determined to be a violation, your team must take it down.
- If a "Medium/High Risk" item is manually determined to be a false positive, your team can manually approve and publish it.
- Compliance Requirement: If you choose to handle manual reviews internally, you must maintain strict records of all completed reviews, including the reviewer's decision and timestamp. AppInChina or Chinese regulators may request these records at any time to verify compliance.
Alternative Cloud Providers
If your global infrastructure is already deeply integrated with a different cloud provider, you may prefer to use their corresponding services in China. While we strongly recommend Alibaba Cloud, the following alternatives are also acceptable and follow a similar integration logic: