Help Center/ Web3 Node Engine Service/ FAQs/ APIs/ How Do I Use HTTP Endpoints and Authentication Credentials to Access Nodes?
Updated on 2024-05-10 GMT+08:00

How Do I Use HTTP Endpoints and Authentication Credentials to Access Nodes?

You can perform the following operations to access a node using an authentication credential.

Prerequisites

You have created a full node.

Procedure

  1. Create and obtain an authentication credential.

    1. On the NES console, choose Dedicated > Authentication Credential and click Create Credential.
    2. Describe the credential and set the access policy.
      Figure 1 Creating a credential
    3. Click OK. The credential is created and then automatically downloaded as a ZIP package.

      Each credential can be downloaded only once. Change the credential periodically for security.

    4. Decompress the package and open the credential.csv file to obtain the credential.

  2. Combine a node with the credential.

    1. Click a node ID.

    2. Obtain the values of HTTP Endpoint and WebSocket Endpoint.

    3. Combine the HTTP endpoint or WebSocket endpoint with a credential.

      Specifically:

      • HTTP endpoint: https://your-http-endpoint/your-credential. For example, https://79b83c56-0a7f-11ee-9cac-0255ac10004e.web3.bcs.ap-southeast-3.myhuaweicloud.com/xxxxxxxxxxxx
      • WebSocket endpoint: wss://your-http-endpoint/your-credential. For example, wss:://79b83c56-0a7f-11ee-9cac-0255ac10004e.web3.bcs.ap-southeast-3.myhuaweicloud.com/xxxxxxxxxxxx

  3. Call the Ethereum node API.

    Enter the HTTP endpoint and parameters in Postman and view the returned result.