【问题标题】:Is it possible to use Huawei developer API via Google Apps Script?是否可以通过 Google Apps Script 使用华为开发者 API?
【发布时间】:2021-12-23 18:18:31
【问题描述】:

1 根据this 指南我创建了API Client;

2 我尝试运行此 Apps 脚本以获取访问令牌并收到错误 502。

var url = "https://connect-api.cloud.huawei.com/api/oauth2/v1/token";

  var options =
  {
    "method" : "POST",
    "contentType" : "application/json",    
    "payload" : {
      "grant_type" : "client_credentials",
      "client_id" : "700000000000000000",
      "client_secret" : "4*********************A"
    }
  };

  var response = UrlFetchApp.fetch( url, options);
  Logger.log(response);

有人可以测试这个小代码吗?你有提议吗?

【问题讨论】:

    标签: huawei-developers appgallery-connect


    【解决方案1】:

    是否可以通过 Google Apps Script 使用华为开发者 API?

    据我所知,华为没有任何限制,但不清楚谷歌是否有。

    我尝试运行此 Apps 脚本以获取访问令牌并收到错误 502。

    错误 502 表示 Internet 上的服务器之间的网络错误,这意味着问题不会出在您的计算机或 Internet 连接上。同时你可以试试:

    • 刷新/重新加载页面
    • 关闭所有打开的选项卡或 windows 并开始新的会话。
    • 清除浏览器的缓存和 Cookie。
    • 如果以上方法均无效,请尝试使用其他浏览器或重新启动 PC。

    【讨论】:

    • 不幸的是,这没有帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-28
    • 1970-01-01
    • 2011-03-06
    • 1970-01-01
    • 2020-05-04
    • 1970-01-01
    相关资源
    最近更新 更多