### 设置Oauth时遇到困难,错误(400):invalid_scope

我想为一个项目调整Google Gemini,这需要使用Oauth2.0来存储数据。我一直在按照文档进行操作。

我在Oauth同意屏幕中已经启用了这些范围,所以我真的不知道是什么导致了这个问题。已启用的范围

当我尝试登录以设置凭据时,我收到了以下错误:

一些请求的范围无效。 {valid=[https://www.googleapis.com/auth/generative-language.tuning\\], invalid=[‘https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/generative-language.retriever’\]}

还有这个错误:错误(400):invalid_scope

这是我使用的命令:

gcloud auth application-default login --client-id-file=client_secret.json --scopes='https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/generative-language.tuning,https://www.googleapis.com/auth/generative-language.retriever'

任何帮助都将不胜感激,谢谢你。


回答:

首先,我将gcloud更新到了最新版本。

其次,正如DazWilkin建议的那样,我将单引号(’)替换成了双引号(”),如下所示:

gcloud auth application-default login --client-id-file=client_secret.json --scopes="https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/generative-language.retriever,https://www.googleapis.com/auth/generative-language.tuning"

Related Posts

使用LSTM在Python中预测未来值

这段代码可以预测指定股票的当前日期之前的值,但不能预测…

如何在gensim的word2vec模型中查找双词组的相似性

我有一个word2vec模型,假设我使用的是googl…

dask_xgboost.predict 可以工作但无法显示 – 数据必须是一维的

我试图使用 XGBoost 创建模型。 看起来我成功地…

ML Tuning – Cross Validation in Spark

我在https://spark.apache.org/…

如何在React JS中使用fetch从REST API获取预测

我正在开发一个应用程序,其中Flask REST AP…

如何分析ML.NET中多类分类预测得分数组?

我在ML.NET中创建了一个多类分类项目。该项目可以对…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注