English
Application Integration Guide
About 473 wordsAbout 2 min
2026-01-19
Fxiaoke provides application entry points, allowing you to easily integrate existing H5/Web applications into Fxiaoke. For details, refer to Enterprise Self-built Application Introduction.
We also provide authentication APIs that enable seamless login to your application using Fxiaoke accounts. Additionally, JS APIs and UI components are available to enrich your application's functionality and better meet enterprise customization needs.
If you only need to add an application entry without implementing single sign-on or using JS APIs, no coding is required—just complete Step 1 below. If your application requires single sign-on, call the authentication API after completing Step 3. For applications using JS APIs, follow all steps below.
Integration Steps
Step 1: Create an enterprise self-built application
Step 2: Obtain CorpAccessToken
Step 3: Implement CorpAccessToken caching
Step 4: Get JsapiTicket
Step 5: Calculate signature
Step 6: Initialize JS API
Step 7: Develop application logic
Step 1: Create an Enterprise Self-built Application
Administrators should log in to Fxiaoke's web portal, navigate to the "Applications" channel → "Application Management", and click "Add Application" to complete setup. Enable "Development Mode" during configuration to view the appId, appSecret, and permanentCode—these will be needed for Step 2. Detailed instructions are available at Creating Enterprise Self-built Applications.
Note: "Development Mode" is unnecessary if only adding an application entry without API calls.
Step 2: Obtain CorpAccessToken
Use the appId, appSecret, and permanentCode from Step 1 to acquire CorpAccessToken. Refer to Establishing Connection - Obtaining CorpAccessToken.
Step 3: Implement CorpAccessToken Caching
Each access_token remains valid for 7200 seconds (2 hours), with automatic renewal during this period. To prevent rate limit issues, cache CorpAccessToken and refresh only after expiration. Since each application's CorpAccessToken is independent, ensure cached tokens are stored separately by application.
For applications requiring single sign-on, proceed with authentication API development after completing this step (see Authentication API).
Step 4: Get JsapiTicket
JsapiTicket serves as temporary credentials for Fxiaoke JS API calls and is used in signature calculation. Normally valid for 7200 seconds, it's obtained via corpAccessToken. See Establishing Connection - Obtaining JsapiTicket. For performance optimization and to avoid API call limitations, developers must implement global JsapiTicket caching.
Step 5: Calculate Signature
Signature generation rules:
- Include these parameters: noncestr (random string), valid jsapi_ticket, timestamp, and current page URL (excluding # and subsequent parts)
- Sort parameters alphabetically by ASCII code
- Concatenate as URL key-value pairs (key1=value1&key2=value2...) without URL encoding
- Generate signature via SHA1: signature=sha1(src_string)
Step 6: Initialize JS API
Refer to Initializing JS API Runtime Environment.
Step 7: Develop Application Logic
Congratulations! With preparations complete, explore Client Development Documentation to leverage Fxiaoke's JS APIs and UI component library for enhanced functionality.
