Thanks for your feedback Joshua. Can you take a screenshot of the Cloud
Console where you think there should be a message or that is misleading,
then go to the appropriate page in the documentation you think additional
messaging would help, and click on the "Send feedback" button in the upper
right corner of that page? The tool will also let you highlight where on
the docs page your messaging should go. This will greatly help the team
analyze your feedback and take appropriate action as necessary.

Cheers,
--Wesley

On Fri, Nov 20, 2020 at 5:33 AM Joshua Smith <mrjoshuaesm...@gmail.com>
wrote:

> That worked. Thank you so much.
>
> You guys need to work on your documentation. I never could have figured
> that out myself. And the process of adding that role to the service account
> was also weird. (The UX is asking for the email of a new user, when what I
> need to add is a service account that isn’t a new user, and isn’t even
> really an email.)
>
> -Joshua
>
> On Nov 19, 2020, at 2:19 PM, 'Amit Sinha' via Google App Engine <
> google-appengine@googlegroups.com> wrote:
>
> *Hello Joshua, could you try to add the “Cloud Translation API User” role
> in the service account from IAM? As of this [1] documentation, it includes
> the permission that showing in the error.[1]
> https://cloud.google.com/iam/docs/understanding-roles#cloud-translation-roles
> <https://cloud.google.com/iam/docs/understanding-roles#cloud-translation-roles>*
> On Monday, November 16, 2020 at 2:23:03 PM UTC-5 Joshua Smith wrote:
>
>> I don’t think Google could have come up with a more confusing and
>> convoluted system for API permission management if they tried.
>>
>> So I’ve enabled the “cloud translation” API within my project.
>>
>> I have some Python (2.7, old school) code that goes:
>>
>> credentials =
>> ServiceAccountCredentials.from_json_keyfile_name(CLIENT_SECRETS_FILE,
>> scopes=['https://www.googleapis.com/auth/cloud-platform’])
>> http_auth = credentials.authorize(Http())
>> service = build("translation", "v3", http=http_auth)
>> service.projects().translateText(parent=“projects/*my-project-id-here*",body={"contents":"bonjour",
>> "targetLanguageCode":"en"}).execute()
>>
>> And I get:
>>
>> googleapiclient.errors.HttpError: <HttpError 403 when requesting
>> https://translation.googleapis.com/v3/projects/*my-project-id-here*:translateText?alt=json
>> returned "Cloud IAM permission 'cloudtranslate.generalModels.predict'
>> denied.">
>>
>> So it seems like I need to check some box somewhere to make this work,
>> but I can’t figure out where.
>>
>> The service account in the client secrets file is working fine when I use
>> it to hit Google Analytics from the same app. And in fact, my code to
>> access GA is almost identical except the scope and service call.
>>
>> Any ideas?
>>
>> -Joshua
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/38511647-af55-4440-b8a9-47a2d26e1f42n%40googlegroups.com
> <https://groups.google.com/d/msgid/google-appengine/38511647-af55-4440-b8a9-47a2d26e1f42n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/96693B33-8943-4948-8444-7F9ABAAAB70D%40gmail.com
> <https://groups.google.com/d/msgid/google-appengine/96693B33-8943-4948-8444-7F9ABAAAB70D%40gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
    wesley chun :: @wescpy <http://twitter.com/wescpy> :: Software
Architect & Engineer
    Developer Advocate at Google Cloud by day; at night...
    Python training & consulting : http://CyberwebConsulting.com
    "Core Python" books : http://CorePython.com
    Python blog: http://wescpy.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAB6eaA6qha4NWpPqtRQvSt3v86vPwJQ02j%3D_UtFT8w5m6KnHGQ%40mail.gmail.com.

Reply via email to