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.
Select ID Type
In this example, we are using the EVM address.Select REST as the Credential Source
Leave Defaults for Request Type and Dimensions
Typically, leave the following fields unchanged. In this example, we use GET and Single Dimension.Enter the Endpoint Link
The endpoint link should be your website’s domain.Example:
https://yourwebsite.com/api?addr=$address
Leave the Header Section Blank
Normally, you can leave the header section blank, as shown in this example.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.Example output:
Define the Expression for Eligibility
Enter the code that evaluates to1
(true) or0
(false) to determine if the user is eligible. If eligible, the result should be1
.Example code:
function (data) { return data.is_ok ? 1 : 0; }
Add a Description for the Task
Provide a description for the task, which will help users understand the requirements.Include the Link for the Action
If users are required to perform an action on your website or app, include the link here.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.Update Frequency
If you selected CSV/Google Sheets for data management, you can indicate how often the credential data should be updated here.
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.