Blocklet Service icon

Blocklet Service

Consume Blocklet Service API

Overview

The "Get User" operation of the Blocklet Service node retrieves detailed information about a specific user identified by their DID (Decentralized Identifier). This operation is useful in scenarios where you need to fetch user profile data, including optional related information such as connected accounts, tags, and passports. For example, it can be used to display user details in an admin dashboard, verify user identity, or aggregate user-related metadata for further processing.

Properties

Name Meaning
User DID The Decentralized Identifier (DID) of the user to retrieve.
Enabled Connected Account Whether to include only enabled connected accounts of the user in the response (true/false).
Include Tags Whether to include the user's associated tags in the response (true/false).
Include Connected Accounts Whether to include all connected accounts of the user in the response (true/false).
Include Passports Whether to include the user's passports in the response (true/false).

Output

The output JSON contains the user data retrieved from the Blocklet Service API. It includes the core user information identified by the provided DID. Depending on the boolean flags set in the input properties, the output may also include:

  • Tags: An array of tags associated with the user.
  • Connected Accounts: Details of the user's connected accounts, optionally filtered by enabled status.
  • Passports: Information about the user's passports.

The structure is a JSON object representing the user and its related entities as requested. There is no binary data output for this operation.

Dependencies

  • Requires an API key credential configured in n8n to authenticate requests to the Blocklet Service API.
  • The node depends on the internal blockletServiceApiRequest function to communicate with the Blocklet Service backend.

Troubleshooting

  • Common Issues:

    • Providing an invalid or empty DID will likely result in an error or no user found.
    • If the API key credential is missing or invalid, authentication errors will occur.
    • Requesting related data (tags, connected accounts, passports) without proper permissions might cause partial or failed responses.
  • Error Messages:

    • "Not implemented user action: getUser": Indicates a misconfiguration or unsupported operation; ensure the operation name is correct.
    • API errors returned from the service will be propagated; check the message for details like "User not found" or "Unauthorized".
  • Resolution Tips:

    • Verify that the DID is correctly specified and corresponds to an existing user.
    • Ensure the API key credential is valid and has sufficient permissions.
    • Use the boolean flags judiciously to avoid requesting unnecessary data that might increase response time or cause permission issues.

Links and References

Discussion