This document introduces the third-party integration guide for the intelligent analysis agent. You will learn how to integrate the agent into web and mobile platforms via API.
Before using the APIs described in this document, you must complete the preliminary steps of integrating JWT-Token and applying for a Token. Please review the invocation method first. For details, see Invocation Method.
The effect based on JWT-Token + iframe is shown below:
General agent | Professional agent |
|---|---|
Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
domain | string | Yes |
| Domain name
|
APPID | number | Yes | 1 | Project id. See the explanation for how to obtain it. |
jwtToken | string | Yes |
| User jwtToken. For retrieval method, see Invocation Method. |
AGENT_ID | number | Yes | 1 | Agent id. See the explanation for how to obtain it. |
tip
See the agent web page link for how to obtain APPID and AGENT_ID.
<iframe src={`${domain}/#/agent?agentId=${AGENT_ID}&appId=${APPID}&inline=true&jwtToken=${jwtToken}`} />
The mobile view can be used for mobile H5, sidebar or floating window activation, or when space is limited. The mobile view and PC view sessions are fully consistent; only the display differs. The agent page is responsive. When accessed from a mobile device, it automatically switches to the mobile view.
Integration method: When accessing with a mobile device, the view automatically switches to the mobile view. You can also use parameters to force the switch to the mobile view. Add &forceMobile=true&inline=true after the url's queryString.
As described above in Web integration - request parameters
<iframe src={`${domain}/#/agent?agentId=${agentId}&appId=${APPID}&jwtToken=${jwtToken}&inline=true&forceMobile=true`} />