Call3rdAPI
≥4.8.1
Interface Function
Forward web requests, as a solution to Cross-Domain Limitations of the third-party API.
Request Parameter
Parameter | Type | Required | Remarks |
---|---|---|---|
APIName | string | true | API name, which is set when registering the third-party API in App Maker platform |
Parameters | Dictionary<string, object> |
false | Parameters for requesting the third-party API |
[info] Note
- Parameters support automatic appending based on request mode of POST and GET.
- APIAccess is not required to be set in the interface parameters of vProfile.
- Non vProfile interface has a 30-second timeout limit.
- The entry address for registering a third-party API is:
[domain]\[tenant]\[appcode]\admin\thirdpartyapi
.- For how to register third party API, please refer to:Registration third party API
- If Append Userinfo is turned on when the interface is registered, the third-party interface can obtain the following information from the request header:
- User information definition (including plus sign): [tenant] + [appCode] + [staffCode]
- header key: User, UICC
- UICC: user information verification code, which is used to verify whether the staff code has been falsified.
- UICC calculation method: MD5 ({api.SecurityToken} {userInfo} {userInfo} {api.SecurityToken}), 32-bit uppercase
Return Data Type
string
Input Sample
{
"APIName": "3rdAPI-demo",
"Parameters": {
"3rdAPIParameter1": "param-example",
"3rdAPIParameter2": "1191c1e6212442d48b21b6e50ebc937a"
}
}
Note
- statusCode:The status of CallAPI,200 indicates the successful calling.
- Info:The information of CallAPI ,which provides error message to developer if an error occurs.
- Data:The content returned by the third-party interface, and response content is the serialized value.
Return Sample
{
"StatusCode": 200,
"Info": "Request (or process) succeeded",
"Data": "3rdAPI result"
}