admin管理员组

文章数量:1312992

I am testing a connection to HMRC API (the UK tax department) and I am not getting a response back. My code generates a URL for me to follow, I then manually enter test user data provided by HMRC for authorization. The manual part is returning the correct redirect URI and says it is successful. But my AppsScript code is saying it isn't authorised.

I have checked the redirect URI on HMRC dev console agrees to that in my script. Client secret and IDs all ok and tested. My AppsScript isn't executing doGet(e) after authorisation. What am I missing? Deployed as web app with access to Anyone. Code below (ugly as I wanted to get this sorted and full of logs which aren't helping):

/**
 * OAuth2 Service Setup for HMRC API
 */
function getOAuthService() {
  Logger.log('

本文标签: