How to avoid UrlFetchApp failing with error 403 I’ve written my first bit of Google Apps Script to call a REST endpoint: