🤝 Third-party activity integration
Although Megaphone supports many first-party quests, there are non-standard quests and verifications that require a custom third-party API integration. This guide explains how you can integrate a custom third-party API to power custom onchain checks, in-app integrations, etc.
🔑 Auth
Your API endpoint should not require any auth and should be an open API endpoint. In the future, we plan to allow custom headers required for the API (ex: API keys).🎟️ Input/request from Megaphone to your API
URL:https://<endpoint>/<path>?<queryParamKey?=<queryParamValue>>
-
<endpoint>/<path>: your base API endpoint -
<queryParamKey?><queryParamValue>: identity-specific static query params. Supported queryParams areevmAddressandemailAddress. If you would like other identity options, please request them on our public Megaphone roadmap.ForevmAddress, we normalize the string to lowercase. Make sure that your endpoint supports lookup by lowercase address to prevent issues!
ForemailAddress, note that Megaphone automatically blocks signups from temporary/disposable email services as part of our anti-sybil protections.evmAddress:evmAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045emailAddress:emailAddress=vitalik@buterin.com
evmAddress
emailAddress
🚪 Expected Output / Response from your API
Response Schema- status:
eligible—200 - status:
ineligible—200 - status
error4xxif Megaphone made a bad request5xxif your API service is unavailable
200
200
4xx
❓ FAQ
What happens when a user is marked ineligible?
What happens when a user is marked ineligible?
You can let us know if you want:
(A) users who are ineligible to be handled as receiving “0” points and completing the activityOR(B) users who are ineligible will temporarily fail the activity and then will be allowed to retry the activity after a cooldown periodWe will configure the appropriate behavior on the Megaphone platform side.