Quick Start

更新时间:
复制 MD 格式

This topic provides an example of how to connect to the AntChain Distributed Identity Service (DIS).

Note

Before you connect to the DIS service, ensure you have a scenario code (biz_code). If you do not have a code, contact the product team to request one. Otherwise, your service API calls will fail.

Connecting to DIS involves the following two steps:

  1. Prepare the environment

  2. Try the sample

Prepare the environment

The APIs for the AntChain Distributed Identity Service are exposed through the Alibaba Cloud gateway. Access the Alibaba Cloud console to view the AccessKey information for your account.

Note: For the production environment (prod), you must configure the ProductInstanceId and the software development kit (SDK). The Alibaba Cloud gateway API documentation for the DIS service includes SDKs for various languages.

  • Alibaba Cloud gateway SDK

    For more information about the Alibaba Cloud gateway Java SDK, see the Ant Developer Center API Platform documentation.

    Add the following Maven dependencies.

      <dependency>
        <groupId>cn.com.antcloud.api</groupId>
        <artifactId>antcloud-api-sdk</artifactId>
        <version>3.2.6</version>
      </dependency>
    
      <dependency>
        <groupId>cn.com.antcloud.api</groupId>
        <artifactId>antcloud-api-blockchain</artifactId>
        <version>1.18.7</version>
      </dependency>
  • DIS service gateway

    Environment

    Environment instance (ProductInstanceId)

    Description

    Production environment (prod)

    mydid-agent-prod

    Production environment

Examples

You can connect through the financial technology gateway to try the sample API. This API queries the original text of a verifiable credential. You can enter any value for the vc_id parameter to test the connection to the API gateway.