我正在尝试使用带有REST api https://translation.googleapis.com/v3的GCP翻译服务来翻译一些文本 我正在使用API密钥身份验证方法。
url和 身体
https://translation.googleapis.com/v3/projects/my-translator-1122333:translateText?key=thisismykey
{
"content": ["Hello"],
"sourceLanguageCode": "en",
"targetLanguageCode": "ru"
}
但是我得到了
{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}
有人可以解释我做错了什么吗? 谢谢