whar是google apps转销商api的oauth服务名称
我尝试将google apps转销商api与google apps脚本一起使用。要使用oauth,我需要AuthServiceName。正确的名字是什么?“应用程序”不起作用。您的应用程序中定义了AuthServiceName,它不依赖于您连接到的API,我怀疑您可能没有完成所有必要的步骤,或者您的oauth调用结构不正确 下面是一个检索域详细信息的调用示例whar是google apps转销商api的oauth服务名称,oauth,google-apps-script,google-reseller-api,service-name,Oauth,Google Apps Script,Google Reseller Api,Service Name,我尝试将google apps转销商api与google apps脚本一起使用。要使用oauth,我需要AuthServiceName。正确的名字是什么?“应用程序”不起作用。您的应用程序中定义了AuthServiceName,它不依赖于您连接到的API,我怀疑您可能没有完成所有必要的步骤,或者您的oauth调用结构不正确 下面是一个检索域详细信息的调用示例 function getCustomer() { //set up oauth for Google Reseller API v
function getCustomer() {
//set up oauth for Google Reseller API
var oAuthConfig1 = UrlFetchApp.addOAuthService("doesNotMatter");
oAuthConfig1.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope=https://www.googleapis.com/auth/apps.order.readonly");
oAuthConfig1.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken");
oAuthConfig1.setAuthorizationUrl("https://www.google.com/accounts/OAuthAuthorizeToken?oauth_callback=https://script.google.com/a/macros");
oAuthConfig1.setConsumerKey(CONSUMER_KEY);
oAuthConfig1.setConsumerSecret(CONSUMER_SECRET);
var options1 = {oAuthServiceName:"doesNotMatter", oAuthUseToken:"always",
method:"GET", headers:{"GData-Version":"3.0"}, contentType:"application/x-www-form-urlencoded"};
//set up user profiles url
var theUrl = "https://www.googleapis.com/apps/reseller/v1/customers/somedomain.com";
//urlFetch for customer list
var customerInfo = "";
try {
var response = UrlFetchApp.fetch(theUrl,options1);
customerInfo = response.getContentText();
} catch(problem) {
Logger.log(problem.message);
}
Logger.log(customerInfo);
}
如果
如果您需要进一步澄清,请告诉我非常感谢。我尝试使用“匿名”作为秘密和密钥,但出现了“usageLimits”错误。因此,使用特定的秘密和密钥似乎更好。如何在康科莱买一个?我需要域密钥和密码吗?如何获取密钥?您需要了解的关于API控制台的所有信息都在这里:非常感谢。。。我在您的脚本代码中使用了我的机密和密钥,但出现了以下错误:值oAuthServiceName错误。。。