Skip to main content
DingTalk offers a wide range of JSAPI capabilities, such as native dialogs, device information, and QR code scanning. YiDA developers can leverage these native APIs to deliver a better User experience.
Keep the following in mind when calling DingTalk JSAPI:
  • In YiDA apps, window.dd is not guaranteed to exist (currently, only the mobile client loads a legacy resource). Load it manually.
  • In YiDA apps, you can call APIs that require Authentication even without configuring dd.config. Use these APIs with caution.
  • Retrieve the corpId parameter required for JSAPI calls with const { corpId } = window.pageConfig || {};.

Usage Guide

Step 1: Asynchronously Load the DingTalk JSAPI Resource

Because window.dd is not guaranteed to exist in YiDA pages, load the DingTalk JSAPI script manually in the didMount lifecycle hook:
Once the resource is loaded, call JSAPI features via window.dd.

Step 2: Call DingTalk JSAPI

After the DingTalk JSAPI is loaded, call DingTalk APIs via window.dd from the action panel:
Many DingTalk JSAPI methods must be called from within the app. Verify that the user is inside the DingTalk client before calling them:

API List

For the full list of supported APIs, see the DingTalk Open Platform Documentation.