简体   繁体   English

“未配置访问权限。 请使用Google Developers Console激活项目的API。“

[英]“Access Not Configured. Please use Google Developers Console to activate the API for your project.”

I have a google site with a form.I have added a script to the form's spreadsheet and added a "on form submit" trigger. 我有一个带有表单的google网站。我在表单的电子表格中添加了一个脚本,并添加了一个“on form submit”触发器。 I am trying to create an empty circle. 我想创建一个空圆圈。

Here is the script. 这是脚本。

function createCircle(e) {

try{
  var email  = Session.getActiveUser().getEmail();
  var sh = SpreadsheetApp.getActiveSheet();
  var circle = PlusDomains.newCircle();
  circle.displayName = e.values[1];
  var userId = 'me';
  circle = PlusDomains.Circles.insert(circle, userId);
  MailApp.sendEmail(email,'event created' , "Circle name is ");
  }catch(e){
    var email  = Session.getActiveUser().getEmail();
    MailApp.sendEmail(email,'event failed' , e.message);
  }

}

I have activated the Google+ Domains API for the script by going to Resources->Advanced Google Services . 我已通过转到资源 - >高级Google服务激活了脚本的Google+域名API。 There is a line that says These services must also be enabled in the Google Developers Console. 有一行说明这些服务也必须在Google Developers Console中启用。 So I went into the Developers console and activated the API. 所以我进入了Developers控制台并激活了API。

I still get the same error, Access Not Configured. Please use Google Developers Console to activate the API for your project. 我仍然得到相同的错误, Access Not Configured. Please use Google Developers Console to activate the API for your project. Access Not Configured. Please use Google Developers Console to activate the API for your project.

It's exactly what it says. 这正是它所说的。 To fix: 修理:

  1. Goto Google Developers Console on https://console.developers.google.com 转到https://console.developers.google.com上的Google Developers Console
  2. Choose your project from the list 从列表中选择您的项目
  3. Select API's from the left nav 从左侧导航栏中选择API
  4. Turn ON the API you are trying to access. 打开您尝试访问的API。

You may need to regenerate your access and refresh token for this to work. 您可能需要重新生成访问权限并刷新令牌才能使其正常工作。

You are using PlusDomains.Circles.insert . 您正在使用PlusDomains.Circles.insert Make sure your site is created under your paid Google Apps account, PlusDomains will only work with Google Domains (ie paid accounts). 确保您的网站是在付费Google Apps帐户下创建的,PlusDomains仅适用于Google Domains(即付费帐户)。 Just a thought 只是一个想法

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 访问未配置。 未为您的项目启用API - Access Not Configured. The API is not enabled for your project 查看脚本日志显示“未找到日志。使用 Logger API 将日志添加到您的项目。” - Viewing script logs shows "No logs found. Use Logger API to add logs to your project." Google Developers Console-获取项目ID的功能? - Google Developers Console - Function to get the Project ID? 我如何“使用 Logger API 将日志添加到您的项目中”? (谷歌脚本) - How do I “Use Logger API to add logs to your project”? (Google Script) 例外:未配置访问权限-API更新后,带有Google Apps脚本的BigQuery - Exception: Access Not Configured - BigQuery with Google Apps Scripts after the API update 有没有一种方法可以通过脚本在Google Developers Console中启用高级google服务? - Is there a way to enable advanced google services in the Google Developers Console by script? Google Prediction API错误“输入的项目无效-它应该是Google API控制台中的数字项目编号” - Google Prediction API error “The project entered is invalid - it should be the numeric Project Number from Google APIs Console” 开发人员如何以编程方式编辑Google文档?是否有Docs API? - How can developers edit a Google Doc programmatically? Is there a Docs API? Apps Script API为现有项目返回404错误。 错误返回为HTML而不是JSON - Apps Script API returning 404 error for existing project. Error returned as HTML rather than JSON 测试列表文件需要您的许可才能访问Google上的数据 - Test -list files needs your permission to access your data on Google
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM