๐ API Tasks
Last updated
Last updated
This documentation provides detailed instructions on how to create and manage custom API tasks within a project using the Tide platform.
To create a task, you must navigate to Tide Campaign Builder, "Task Step".
Select "API" in the task selector and choose "Verify execution of a task on given API".
Fill out the form with the following info:
API Endpoint: The URL of the endpoint that will be called to check the task status.
Request Headers (optional): Any headers that are required for the endpoint request, if there are any.
Website URL: The URL that points to the website where the task actions need to be performed.
Description: a detailed description to explain to the users what they should do to be eligible to complete the task.
Once the form is filled out, the task will indicate the validation status:
The endpoint and headers must be validated by Tide before the task can be displayed in the campaign.
For an endpoint to be validated, it must meet the following criteria:
User Address Query Parameter:
The endpoint must accept a query parameter named userAddress
(do not add this parameter in the endpoint field).
The userAddress
must be the lowercase EVM address of the user attempting to complete the task. This address is the same one used by the user to connect to the Tide platform.
JSON Response Format:
The endpoint must return a JSON response with the following structure:
A value of true
indicates that the user can complete the task.
A value of false
indicates that the user cannot complete the task.
If the endpoint meets these criteria, the task will be displayed in the Tide campaign. Otherwise, the task will not be displayed.
When the endpoint returns a successful result (eligible: true
), the userโs task status is set to "completed".
By following the steps outlined in this documentation, projects can successfully create and manage API tasks on their own. Ensure that your endpoint, headers, and website URL are correctly submitted and validated and that the endpoint response adheres to the required format.
This will allow for seamless integration and task management within your Tide campaign.
For any further assistance or questions, please contact the Tide support team.