我在file.getSignedUrl上发现了以下错误。我还有其他功能来复制这个文件并在云存储上创建新的文件。为什么这个函数需要许可,我需要在哪里设置?
(/layers/google.nodejs.yarn/yarn_modules/node_modules/gaxios/build/src/gaxios.js:129:23) (/layers/google.nodejs.yarn/yarn_modules/node_modules/google-auth-library/build/src/auth/oauth2client.js:368:18) at runMicrotasks () a
我正在使用PHP处理一个项目,需要使用PHP客户端库实现Google,但身份验证似乎不适合我。我已经创建了一个服务帐户并授予了项目所有者权限,我不想使用GOOGLE_DEFAULT_CREDENTIALS环境变量进行身份验证,我想使用服务帐户身份验证。
以下是我尝试过的:
require 'vendor/autoload.php';
use Google\Cloud\Core\ServiceBuilder;
use Google\Cloud\Storage\StorageClient;
// Authentication with Google Cloud Platform
我正在使用云存储实例将图像存储在我的NextJS web应用程序中。
我指的是这样的图像:
... some code
image="https://storage.cloud.google.com/{my-project}/myimage.jpg"
... some more code
我得到这样一个错误:
GET http://localhost:3000/_next/image?url=https%3A%2F%2Fstorage.cloud.google.com{image link to Cloud Storage} 400 (Bad Request)
在阅读了一些
所以我有一个在服务器上运行的Python脚本(PHP运行它)。然而,脚本必须在youtube上对用户进行身份验证。当您在本地运行它时,它会打开浏览器,允许进行身份验证并请求许可。一切都正常。当我允许用户在服务器上运行它时,它将尝试打开服务器上的auth屏幕。我需要将响应传递给网络浏览器。有什么想法吗?我使用youtube api示例中的auth脚本:
# The CLIENT_SECRETS_FILE variable specifies the name of a file that contains
# the OAuth 2.0 information for this applica
我已经为此绞尽脑汁一天多了,但我不知道如何通过附加在Google工作表上的应用程序脚本将数据上传到google Cloud Storage。我遇到了授权方面的问题。我已经从复制了getService方法(粘贴在下面),但该服务总是无法获得授权。service.hasAccess()总是返回false。
function uploadFileToGCS(dataJSON) {
var service = getService();
if (!service.hasAccess()) {
Browser.msgBox("Failed to grant service ac
我正在尝试使用通过Google函数(Nodejs)从Firebase存储获取下载URL。我在中得到了这个错误:
{ SigningError: A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified.
我在Linux上使用Python2.7.9,在Google-Cloud Server SDK上使用谷歌的。我的目标是上传一张图片到Google Cloud Platform,但是我得到了下面的错误。
File "/home/pi/test.py", line 15, in <module>
zebraBlob.upload_from_filename(filename='/home/pi/Pictures/testimg.jpg')
AttributeError: 'NoneType' object has no attribut
我在Google Cloud Functions上运行了一个HTTP触发的函数,它使用require('googleapis').sheets('v4')将数据写入文档电子表格。
对于本地开发,我通过他们的开发人员控制台的部分添加了一个帐户。我下载了令牌文件(下面是dev-key.json),并使用它对我对Sheets API的请求进行身份验证,如下所示:
var API_ACCT = require("./dev-key.json");
let apiClient = new google.auth.JWT(
API_ACCT.client