⛓️Integrate APIs
Last updated
Last updated
When a quester engages with a custom task, Intract triggers the necessary APIs with the required parameters to verify the task. You have the option to integrate your API using cURL or manually connect it. If you're unsure about creating an API, fret not, we also have a section on generating your own API-based template.
First, go to "Task APIs" from your community dashboard and click on "Connect your API"
Add API Name and select API Type from REST/GraphQL
Select what actions your API will verify. Additionally if your API is for a special kind of task like the one with Dynamic XP or with recurrence, select appropriate check boxes. then click "Next".
Paste your API cURL or click skip to add the details manually. Then click "Next".
If you prefer to connect your API manually, you'll need to input the following details:
Endpoint: Provide the endpoint URL of your API.
API Method: Indicate whether the method is POST or GET.
Payload Method: Specify how payloads are handled, whether using Query Params or Body.
Payload: Pick between Wallet Address, Twitter Id, Twitter Handle, Discord Id, Discord Username, Telegram Id, and Email.
Constant Values: You can also add constants not mentioned in the above Payloads
Custom Headers: Use headers for additional authentication or to access private APIs.
Click "Test API" for testing with sample payloads.
If everything goes well, you can click SAVE API here.
If not, click on "Format API Response" to evaluate the API response data.
You can write code in JavaScript for the expressions for response Result, Code, Error Message, Task Metric, and Task Metric Data Type.
Contact us by pressing on the Chat button if you face any issues with the API Integration process.