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 — API key authentication doesn't work for Cloud Natural Language · Issue #2498 · googleapis/google-cloud-node

API key authentication doesn't work for Cloud Natural Language #2498

New issue
Copy link
New issue
Copy link
Closed
Closed
API key authentication doesn't work for Cloud Natural Language#2498
Copy link
Assignees
lukesneeringer
Labels
type: questionRequest for information or clarification. Not an issue.

Description

@anotheri
anotheri
opened on Jul 31, 2017
Issue body actions

Environment details

  • OS: Ubuntu
  • Node.js version: 8.1.4
  • npm version: 5.0.3
  • "@google-cloud/language": "^0.11.0"

Steps to reproduce

  const language = require( '@google-cloud/language' )( {
    projectId: <MY_PROJECT_ID>,
    key: <MY_API_KEY>
  } );

It throws:

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): 
Error: Could not load the default credentials. 
Browse to https://developers.google.com/accounts/docs/application-default-credentials 
for more information.

It works with credentials object and with config json file, but it fails with API key.
Please advise or fix.

Activity

  1. anotheri commented on Jul 31, 2017

    @anotheri
    anotheri
    on Jul 31, 2017
    Author
    More actions

    And it looks like API key auth doesn't work for other packages as well, see: #1424

  2. lukesneeringer commented on Aug 4, 2017

    @lukesneeringer
    lukesneeringer
    on Aug 4, 2017
    Contributor
    More actions

    This is something that just got a decent bit of discussion internally on the Python side, where we did have support and actively removed it. Essentially, API keys are a discouraged form of authentication at this point, and we do not intend to support them in client libraries.

  3. lukesneeringer
    closed this as completedon Aug 4, 2017
  4. anotheri commented on Aug 4, 2017

    @anotheri
    anotheri
    on Aug 4, 2017
    Author
    More actions

    @lukesneeringer thanks for the answer; that'd be super helpful to add a clear note that API key auth is not supported in the documentation then.

  5. stephenplusplus
    added
    auth
    type: questionRequest for information or clarification. Not an issue.
    on Aug 4, 2017
  6. JustinBeckwith
    assigned
    lukesneeringer
    on Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lukesneeringer
    lukesneeringer

Labels

type: questionRequest for information or clarification. Not an issue.

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.