Getting Twiitter account (Verified, Non-Verified) information from OpenSea using API and Google Apps Script

88 views Asked by At

This is the continuation of my previous question, Roomi proposed a following solution:

function getTwitterLink() {

 var url = "https://api.opensea.io/api/v1/user/0xe7dAe42Dee2BB6C1ef3c65e68d3E605faBcA875d";

 var options = {
    method: 'GET',
    headers: {
      'X-API-KEY': 'YOUR_API_KEY'
    },
    muteHttpExceptions: true
  };
  
 var response = UrlFetchApp.fetch(url, options);
 var payload = JSON.parse(response.getContentText());
 var twitterLink = "https://twitter.com/" + payload.account.twitter_username;
 console.log(twitterLink)
 }

It works perfectly when a verified Twitter account is connected with OpenSea user profile but it does not get the information (Twitter profile link) of the non-verified Twitter account. Following are the screenshots which I am talking about:

Non-Verified verified

Non-Verified Wallet Address: https://opensea.io/0xed3c3bffcf147850406d0e58ce4f4ebd2b5cd96c

Verified Wallet Address: https://opensea.io/0xe7dAe42Dee2BB6C1ef3c65e68d3E605faBcA875d

The script does not get Twitter information from the left screenshot (Non-Verified) and works well with the right screenshot (verified account). Any idea how to get information (Twitter profile link) from both types of accounts, can we directly scrape information from OpenSea user profiles? Thank you

0

There are 0 answers