我试图在我的应用程序中使用Google Cloud Translation API,但每当我试图翻译一些东西时,它都会出现这个缺少有效API的错误。
我已经做了,但那不起作用。
我已经尝试了中的步骤,但也不起作用。
E/AndroidRuntime: FATAL EXCEPTION: main
Process: herrsa1.bit.translator, PID: 16598
com.google.cloud.translate.TranslateException: The request is missing a valid API key.
at com.google.clou
我正在努力学习Google如何与Java一起工作,但我很难找到如何输入API的授权密钥。API键指令要求使用key=API_KEY参数传递它,但我不确定输入的位置。这是添加到主类中还是在另一个子类中输入的?
我使用运行在Windows 10上的Eclipse作为我的平台。我的基本配置来自。按照这些步骤,我已经在Google注册并创建了API-Key,将.JSON文件下载到我的笔记本上,并安装了Google,并遵循了在这个上配置的说明。
我用来测试的代码是在的Quickstart中找到的示例Java代码。
// Imports the Google Cloud client library
im
我有配置,gcloud遵循下面的链接
我拿到了认证账户
当我调用翻译API或语音API时,错误消息会挂起很长时间
线程"main“com.google.cloud.translate.TranslateException:中获取服务帐户访问令牌的异常: at com.google.cloud.translate.spi.v2.HttpTranslateRpc.translate(HttpTranslateRpc.java:61) at com.google.cloud.translate.spi.v2.HttpTranslateRpc.translate(HttpTran
我遵循来启动java客户端演示。我已经有了set 身份验证json文件到环境变量GOOGLE_APPLICATION_CREDENTIALS。但是,当我运行java示例代码时,我得到了translateException。
Exception in thread "main" com.google.cloud.translate.TranslateException: The request is missing a valid API key.
at com.google.cloud.translate.spi.v2.HttpTranslateRpc.translate(Ht
我是android开发的新手。我使用firebase作为后端,通过Android开发了这个应用程序,并通过仿真器运行所有的程序。当我试图使用G转换API构建一个应用程序时。我已经启用了GCP控制台中的每个身份验证。错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{testing.com.login/testing.com.login.MainActivity}: com.google.cloud.translate.TranslateException: The request is missing a
我正在尝试安装Google翻译脚本,但没有工作,经过3个小时的调查后,我向您寻求帮助
quickstart.php的代码是
<?php
/**
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use t
his file except in compliance with the License.
* You may obtain a cop
当我试着喝可乐时,例如 from google.cloud import translate
client = translate.Client()
client.translate("Where is the store?", target_language='zh') 我得到以下错误... # Cloud Translation API has not been used in project 12345678901 before or it is disabled.
# Enable it by visiting https://console.dev
我的计费帐户已链接并已启用。api处于启用状态。
下面是我的测试方法的代码:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
# Imports the Google Cloud client library
use Google\Cloud\Translate\TranslateClient;
class GoogleTranslateController extends Controller
{
# Your Google Cloud Platform project ID
因为我已经在本地计算机上安装了Google云控制台应用程序,所以每当我的JAVA服务器调用google translate时都会收到这个错误:
Exception in thread "Thread-22" com.google.cloud.translate.TranslateException: 400 Bad Request
{
"error": {
"code": 400,
"message": "The API Key and the authentication credential are
我在谷歌的文档里读了几个小时,但我仍然不知道自己在做什么。基本上,我只是想使用google翻译api来翻译我想要的几个单词。我有一个包含账单详细信息的有效帐户,我尝试了google的代码示例:
# Imports the Google Cloud client library
from google.cloud import translate
# Instantiates a client
translate_client = translate.Client()
# The text to translate
text = u'Hello, world!'
# The
我有一个GoogleTranslate服务,可以翻译我的应用程序中的文本。这个特性可以在本地主机上工作,但是在生产中它会引发
未初始化常数谷歌::云在我的app/helpers/google_translations_helper.rb:4:in‘初始化’.
下面是与Gemfile相关的部分:
# use of google API
gem 'google-api-client', '~> 0.11', :require =>
'google/apis/analyticsreporting_v4'
gem 'omn
我正试图在我的Laravel项目上使用谷歌翻译API。我遵循了本教程
但当我试图运行代码来翻译时,我会发现这个错误-
Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most server applications use service accounts instead. If your application continues to use end user credentials from Cloud SDK, you might
因此,我完全按照Google Translate API的文档遵循相同的过程。
其中提供了以下代码。
# Imports the Google Cloud client library
from google.cloud import translate
# Instantiates a client
translate_client = translate.Client()
# The text to translate
text = u'Hello, world!'
# The target language
target = 'ru'
# Tran
当我尝试安装Google Core API包时,对于这个包的每个不同版本,它总是得到错误。这个应用程序是在Python 3中运行的,我得到了以下日志:
The user requested google-api-core==1.21.0
google-cloud-core 1.4.3 depends on google-api-core<2.0.0dev and >=1.19.0
google-api-core[grpc,grpcgcp] 1.29.0 depends on google-api-core 1.29.0
ERROR: Cannot install -
通过调用translate api,我收到了错误消息"Requests from this ios client application \u003cempty\u003e are blocked“,我已经在web上设置了ios应用程序和我的捆绑包id。请帮帮忙
let TRANSLATE_API = "https://translation.googleapis.com/language/translate/v2"
let GOOGLE_CLOUD_API_KEY = "<API_KEY>"
let urlP