GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove support for API_KEY in translation · Issue #2734 · googleapis/google-cloud-python

Remove support for API_KEY in translation #2734

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove support for API_KEY in translation#2734
Copy link
Assignees
dhermes
Labels
api: translationIssues related to the Cloud Translation API API.

Description

@dhermes
dhermes
opened on Nov 14, 2016
Issue body actions

See #2731

Activity

  1. dhermes
    added
    api: translationIssues related to the Cloud Translation API API.
    on Nov 14, 2016
  2. dhermes
    self-assigned this
    on Nov 14, 2016
  3. tseaver commented on Nov 15, 2016

    @tseaver
    tseaver
    on Nov 15, 2016
    Contributor
    More actions

    /cc @jonparrott for confirmation that we can safely remove it (per today's discussion).

  4. theacodes commented on Nov 15, 2016

    @theacodes
    theacodes
    on Nov 15, 2016
    Contributor
    More actions

    @puneith our sample over at python-docs-samples still uses an API Key. Can we switch the sample over to service account credentials?

  5. puneith commented on Nov 15, 2016

    @puneith
    puneith
    on Nov 15, 2016
    Contributor
    More actions

    This still uses API_KEY https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/translate/google/cloud/translate/client.py

  6. dhermes commented on Nov 15, 2016

    @dhermes
    dhermes
    on Nov 15, 2016
    ContributorAuthor
    More actions

    @puneith The point (I think) was that by moving the sample away from the API key feature, we could more easily remove support for that feature in this library in future versions.

  7. puneith commented on Nov 15, 2016

    @puneith
    puneith
    on Nov 15, 2016
    Contributor
    More actions

    Got it. I will make the appropriate changes.

  8. geoffwalmsley commented on Nov 28, 2016

    @geoffwalmsley
    geoffwalmsley
    on Nov 28, 2016
    More actions

    I have recently started having problems making simple api-key translation calls. It works ok with one virtualenv, but running in a different virtualenv, and/or different project causes this error:

    google.cloud.exceptions.Forbidden: 403 Google Translate API has not been used in project google.com:cloudsdktool before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/translate.googleapis.com/overview?project=google.com:cloudsdktool then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry. (GET https://translation.googleapis.com/language/translate/v2?target=en&q=mein&source=de)

    It looks like it's trying to use the project cloudsdktool rather than the one I have setup using gcloud. Any idea how to fix this? It used to work so easily!!

  9. daspecster commented on Nov 28, 2016

    @daspecster
    daspecster
    on Nov 28, 2016
    Contributor
    More actions

    @geoffwalmsley are you setting the GOOGLE_APPLICATION_CREDENTIALS environment variable?

    Otherwise you should be able to set the project when creating the Client(project='my-project').

  10. theacodes commented on Nov 28, 2016

    @theacodes
    theacodes
    on Nov 28, 2016
    Contributor
    More actions

    @geoffwalmsley this is a quirk of how default credentials works. In your case the credentials are being supplied by the Cloud SDK. Unfortunately, these credentials are not sufficient for using the translate API. You'll need to download a service account key and use that.

  11. dhermes commented on Dec 2, 2016

    @dhermes
    dhermes
    on Dec 2, 2016
    ContributorAuthor
    More actions

    @jonparrott Are you still opposed to removing support for API key? You were concerned that it was needed for Python clients which can't store secrets, though the API key is itself a secret.

  12. theacodes commented on Dec 2, 2016

    @theacodes
    theacodes
    on Dec 2, 2016
    Contributor
    More actions

    I'm not opposed to removing it.

  13. dhermes
    added a commit that references this issue on Dec 6, 2016

    Removing support for API_KEY auth in translate.

    This issue will close once commit a24025f is merged into the 'master' branch.
    a24025f
  14. dhermes
    closed this as completedin #2823on Dec 6, 2016
  15. richkadel
    added a commit that references this issue on May 6, 2017

    Removing support for API_KEY auth in translate.

    This issue will close once commit d573ac4 is merged into the 'master' branch.
    d573ac4
  16. parthea
    added a commit that references this issue on Sep 22, 2023

    chore: move samples from python-docs-sample (#66)

    d3dcbbc
  17. parthea
    added a commit that references this issue on Oct 21, 2023

    Removing support for API_KEY auth in translate.

    This issue will close once commit 4ddbcec is merged into the 'main' branch.
    4ddbcec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

api: translationIssues related to the Cloud Translation API API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.