google-translate
google-translate copied to clipboard
change base url to translation.googleapis.com
as in a guide here https://cloud.google.com/translate/docs/reference/rest/v2/translate
the GET should be changed to POST
curl example
export GOOGLE_APPLICATION_CREDENTIALS="/home/srghma/Downloads/My First Project-93b2e4e681f8.json"
json='
{
"q": "angekommen",
"source": "de",
"target": "ru"
}
'
echo $json | curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d @- \
https://translation.googleapis.com/language/translate/v2
@srghma can you change the GET to POST too ?