Skip to main content

HTTP connector

Function

Free Edition

Light edition

Professional Edition

Exclusive Edition

HTTP connector

1

1

Unlimited quantity

Unlimited quantity

If the DingTalk official connector cannot meet your needs, but you need to connect to DingTalk applications, self-built systems, or third-party application systems, you can customize the connector through the YIDA connector factory.

Step 1: Create a connector

  1. Log on as an administratorYIDA Workbench.
  2. Click in the upper-right cornerPlatform Management
    Button to go to the platform management page.
  3. Click the left-side menu bar.Connector factory, and then clickCreate a connector, select HTTP connector.

  1. Refer to the following information to configure the basic information of the connector, and clickNext Step.
    • Connector display name:The name of the custom connector.
    • Icon Image address:The icon displayed by the connector. If you do not specify it, the default icon will be displayed.
    • Connector description:Basic description of connector
    • Domain name:The host address of the request does not need to contain the http:// or https:// protocol header, and does not need the end of the // protocol.
    • Request Protocol:Protocol Type
    • Base URL:You can configure the basic prefix URL in the request address. If not, you can fill in "/" directly.

  1. ConfigureAuthentication Type.

Authentication Type

Description

No authentication

No authentication is an interface that is called directly without any authentication information. It is usually used to access some public interfaces.

Basic authentication

BasicHTTPAuthorizationThe request Header contains the credentials used by the server to verify the identity of the user agent.Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1lThe Base64 encoded account password.

Encryption format:Account: password.

You only need to configure the prompt label of the account password to prompt the user to know what to fill in the registration authentication information.

  • username label
  • password label

API key

That isAPIKeyAuthentication method, the APIKeyIt is valid for a long time (please keep it properly). Visitors create a secret key in the system to be accessed. Developers can directly call public APIs that support such authentication through this credential.

  • Parameter label: prompts when Configuring authentication information.
  • Parameter name: the name of the apiKey required by the system.
  • Parameter location: you can add the authentication information to the query parameter or header and select it according to the system requirements of the request.

Alibaba Cloud API Gateway

When you add an authentication template after the connector is created, enter App Code and call the corresponding Alibaba Cloud API.

For more information, see,Use authentication App Code to call APIs.

DingTalk open platform verification

After creating the connector, add an authentication template.App Key,App SecretYou can call DingTalk open platform APIs (including YIDA APIs).

After the authentication template is added, YIDA automatically generates authentication parameters through authentication.access_token, added toHeaderParameterx-acs-dingtalk-access-token, no need to generate again.

For more information, seeDingTalk application development process.

DingTalk zero trust Gateway

For more information about how to use the DingTalk zero-trust gateway, seeDingTalk open platform-zero trust network authentication.


Step 2: Create an execution action

On the execute action page, clickAdd execution action, and then configure it according to the following information.

Name

Description

Basic information

Configure the basic information of the current action.

  • Unique Identifier: identifies different operations.
  • Action name: the name of the action.
  • Action description: the description of the action.

Interface request

Configure which interface to request when the current execution action is triggered.

  • Request address: The interface request link. The requested domain name is automatically filled with the domain name of the connector.
  • Request method: supports request methods such as GET, POST, DELETE, PUT, HEAD, OPTIONS, and PATCH.
  • Query: indicates the request parameter, which usually refers to the question mark of the URL.?Click the plus sign to add the additional parameter.
  • Body: if it is a POST request, there may be a Body field that can be parsed using request JSON.
  • Headers: You can customize additional request header information here. Currently, only static configuration is supported.
  • Path: represents the variable with braces configured in the URL, such{pathParam}, wherepathParamThe name of the variable.

Interface return

It is used to configure the expected return result after the API is called successfully. JSON can be used for parsing.

Step 3: Configure authentication

All custom connectors need to create corresponding request authentication schemes, even 「No authenticationYou also need to create.

  1. Create an account

If you click test on the configured Connector, an authentication account will be selected. In this case, you can also add an authentication account.

  1. InputAccount display name,App Key,App SecretWait for information, and thenClickConfirm.

Step 4: Test the connector

  1. On the connector details page, clickTestButton.

  1. Select the authentication used to configure the test parameters.

  1. ClickTest, the expected result is that the configuration is successful.

This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4