Use Google Apps Script to Access the Pinboard API

I’m creating a spreadsheet in Google Sheets to import my Pinboard links so I can search them. This is just the bit of code I used to get the json version of my latest links.

var urlRecent = 'https://api.pinboard.in/v1/posts/recent?format=json';
  
  var response = UrlFetchApp.fetch(urlRecent, {
    headers: {
      'Authorization': 'Basic ' + Utilities.base64Encode('USERNAME' + ':' + 'PASSWORD')
    }
  });
  Logger.log(response);

Resources