n onApiLoad()
    {
      gapi.load('picker', {
        'callback': function() {
            pickerApiLoaded = true;
          }
      });
        
      google.script.run.withSuccessHandler(getSecrets).withFailureHandler(showError).getOAuthToken();
    }

    /**
     * Get secrets needed for proper picker authorization.
     * @param {string} token OAuth token for the user.
     **/
    function getSecrets(token)
    {
      oauthToken = token;

      google.script.run.withSuccessHandler(onGetSecretsSucce