Skip to main content
Rest API Management
Updated over 2 weeks ago

Follow these steps to create an on-chain credential using REST. Please note that the endpoint cannot be shown for security reasons, but the images provided below will guide you through the process. Your developer should be involved in creating the REST API for technicalities.

  1. Select ID Type
    In this example, we are using the EVM address.

    IMAGE1

  2. Select REST as the Credential Source

    IMAGE2

  3. Leave Defaults for Request Type and Dimensions
    Typically, leave the following fields unchanged. In this example, we use GET and Single Dimension.

    IMAGE3

  4. Enter the Endpoint Link
    The endpoint link should be your website’s domain.

    Example:
    https://yourwebsite.com/api?addr=$address

    IMAGE4

  5. Leave the Header Section Blank
    Normally, you can leave the header section blank, as shown in this example.

    IMAGE5

  6. Test the Endpoint with a Sample EVM Address
    Test the response section by entering a sample EVM address to determine if the task is working.

    IMAGE6

    Example output:

    IMAGE7

  7. Define the Expression for Eligibility
    Enter the code that evaluates to 1 (true) or 0 (false) to determine if the user is eligible. If eligible, the result should be 1.

    Example code:

    function (data) { return data.is_ok ? 1 : 0; }

    IMAGE8

  8. Add a Description for the Task
    Provide a description for the task, which will help users understand the requirements.

    IMAGE9

  9. Include the Link for the Action
    If users are required to perform an action on your website or app, include the link here.

    IMAGE10

  10. Specify the Task Deadline
    If there is a deadline to complete the task, you can indicate it here. The 'Participation End Time' might not always align with the quest's end time.

    IMAGE11

  11. Update Frequency
    If you selected CSV/Google Sheets for data management, you can indicate how often the credential data should be updated here.

    IMAGE12

This tutorial offers a comprehensive guide for creating on-chain credentials using REST API. Be sure to follow the steps and check the images for clarity. Your developer should assist in handling the technical aspects of the integration.

Did this answer your question?