- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 06:42 AM
Hi Team,
Currently google API for translation is not working in production, when I check the logs , I got below error (ACCESS_TOKEN_SCOPE_INSUFFICIENT), detailed message at the end.
I tried by defining the Auth Entity scopes(provided below) while sending the access token request but generated token still throws the same error.
scopes are:
https://www.googleapis.com/auth/cloud-translation
https://www.googleapis.com/auth/cloud-platform
I initially raised it ServiceNow but they replied saying it Google Cloud Support Issue, I am raising it with Google Support as well. In meantime, If someone has faced this issue and found the solution please let me know.
Please note, this issue has seen recently around 16th Oct, before that API was working fine.
End Point : https://translation.googleapis.com/v3/projects/<project-code>/locations/global:translateText
Error while translating the text to language using Google Cloud Translator. Error:Request had insufficient authentication scopes.Response received:
{
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
"domain": "googleapis.com",
"metadata": {
"service": "translate.googleapis.com",
"method": "google.cloud.translation.v3.TranslationService.TranslateText"
}
}
]
}
}
#googleTranslationAPIIssue
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 07:52 AM
I have managed to find the solution of this issue.
Instead of passing the scopes under 'Auth Entity scopes' we should pass the scope for Google Translation API under 'JWT Claim Validation (table -jwt_claim_validation)" like below:
JWT provide should be Google Translation Service.
'claim value' must be passed as below, please note, both scopes are space separated.
https://www.googleapis.com/auth/cloud-translation https://www.googleapis.com/auth/cloud-platform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 01:50 PM
Issue is fixed for us as well. Thanks .... As we have changed some tokens in google side while performing the initial troubleshooting. After redoing everything with above mentioned changed it worked.