global:translateText permission error for Base Google NMT in v3beta1 API

1,431 views
Skip to first unread message

Erik Chan

unread,
Apr 27, 2019, 7:25:40 AM4/27/19
to Google Cloud Translation API
I am following the documentation on this page to use the base Google NMT in the v3beta1 API: https://cloud.google.com/translate/docs/translating-text-v3

curl -X POST \
     -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
     -H 'Content-Type: application/json' --data "{
     model: 'projects/
     model: 'projects/project-id/locations/global/models/general/base',
     source_language_code: 'en',
     target_language_code: 'de',
     contents: ['Come here!']
}"
I don't receive permission errors with Custom Models but I am receiving a permission error with the Base NMT Model:
{"error"=>{"code"=>403, "message"=>"Cloud IAM permission 'cloudtranslate.generalModels.predict' denied. ", "status"=>"PERMISSION_DENIED"}}{"error"=>{"code"=>403, "message"=>"Cloud IAM permission 'cloudtranslate.generalModels.predict' denied. ", "status"=>"PERMISSION_DENIED"}}{"error"=>{"code"=>403, "message"=>"Cloud IAM permission 'cloudtranslate.generalModels.predict' denied. ", "status"=>"PERMISSION_DENIED"}}  Rendering models/translate_user.js.erb
  Rendered models/translate_user.js.erb (0.5ms)

Erik Chan

unread,
Apr 28, 2019, 12:03:28 AM4/28/19
to Google Cloud Translation API
Resolved, new IAM permissions were required (different than AutoML roles)
Reply all
Reply to author
Forward
0 new messages