Twitter account verification

How does the External Adapter verify a Twitter account?

Verifying a new Twitter account on the App
Verify a new Twitter account.
Accessing the VerifyTwitter contract on Polygonscan from the App
Access the updated VerifyTwitter contract from the Drawer.

How to make a request?

Let's take a look at the verification process. As well as it can be requested from the App, a verification can also be asked directly from the VerifyTwitter contract. It will only take a username as an input, and grab the Ethereum address from the interacting user.

Parameter
Example input
Info

_username

bob

A string representing the Twitter handle. The @ should not be provided.

_userAddress

The user approving the transaction - the address can't be supplied, as it will grab it from the transaction.

The process following the request is described in the preceding section (The verification process). We will now further investigate the way in which the External Adapter operates.

How does the EA perform the verification?

The External Adapter is written as a serverless function. Each time it is triggered with a request, the API server grabs the input parameters, performs the custom computation, and sends back its result (or an error, if anything happens in between). The full code is available here. Let's take a look at what occurs inside the scope of the createRequest function ; you will find comments directly in the code, to explain the process.

Resources

Last updated