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 — New to Google Cloud Platform; running the sample gives auth error? · Issue #329 · GoogleCloudPlatform/nodejs-docs-samples

New to Google Cloud Platform; running the sample gives auth error? #329

New issue
Copy link
New issue
Copy link
Closed
Closed
New to Google Cloud Platform; running the sample gives auth error?#329
Copy link
Labels
🚨This issue needs some love.triage meI really want to be triaged.

Description

@willemmulder
willemmulder
opened on Mar 31, 2017
Issue body actions

I'm new to the Google Cloud Platform and was happy to find this repo of examples.

However, when I simply follow the instructions I seem to get an auth error?

node recognize.js stream ./resources/audio.raw -e LINEAR16 -r 16000

Gives me

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.

Which points to a page full of information about authentication, except the information I'm looking for: how can I simply pass an API key to the Speech client so it just simply works?

Could the documention be updated to instruct step-by-step how to do auth? Would it be possible to make that work something like

Speech({
  apikey: [somekey]
});

? Or is there a reason not to make it that easy?
Right now it feels like there are so many implicit assumptions and things around auth that scare newcomers away.

Would be happy to help in any way once I understand how it works.

Activity

  1. ace-n commented on Apr 3, 2017

    @ace-n
    ace-n
    on Apr 3, 2017
    Contributor
    More actions

    You need to authenticate with an account (either a standard Google user account, or a Google Cloud Platform service account).

    Does this part of that page help?

  2. willemmulder commented on Apr 5, 2017

    @willemmulder
    willemmulder
    on Apr 5, 2017
    Author
    More actions

    Yes that seems to be the important part; thanks.

    Could we update the documentation with two parts?

    1. Mention the environment variables explicitly, so that the example code runs without 'unexpected' issues
    2. Also explain how the API can be used with an API key. I don't seem to understand how that works yet either.
    Reacted by Skye Butterfield
  3. jmdobry commented on Aug 21, 2017

    @jmdobry
    jmdobry
    on Aug 21, 2017
    Member
    More actions

    For 1), this repo has setup instructions for running samples.

    For 2) we don't want to encourage the use of API keys. The more secure authentication method is with a Service Account. The setup instructions in 1) should help with this.

  4. jmdobry
    closed this as completedon Aug 21, 2017
  5. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 6, 2020
  6. NimJay
    added 3 commits that reference this issue on Nov 9, 2022

    chore: release 3.1.7 (#327)

    0f1df34

    chore: release 3.6.2 (#329)

    99fd6c3

    chore: release 3.6.2 (#329)

    1344cb2
  7. ace-n
    added 2 commits that reference this issue on Nov 16, 2022

    chore: update license headers (#329)

    ade28d3

    chore: update license headers (#329)

    a904190
  8. ahrarmonsur
    added a commit that references this issue on Nov 17, 2022

    chore: update license headers (#329)

    b24a149
  9. NimJay
    added 2 commits that reference this issue on Nov 18, 2022

    chore(main): release 2.6.0 (#329)

    3315da9

    chore(main): release 2.6.0 (#329)

    399040d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚨This issue needs some love.triage meI really want to be triaged.

    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.