Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating Service Account flow has changed within Developer console causing confusion in steps below. #27

Open
Jdtanacredi opened this issue Mar 31, 2017 · 1 comment

Comments

@Jdtanacredi
Copy link

I am trying to use your package and noticed that the steps listed below have now been modified while in Google's console:

  1. Under "OAuth", click the "Create new client ID" button.
  2. Select "Service account" as the application type and click "Create Client ID".

When I click on "Create Credentials" I have a services account option in the dropdown. Once I select that and follow the rest of your steps I'm hitting an error while running the following code:

var googleAuth = require('google-oauth-jwt');

googleAuth.authenticate({
email: 'my-service-account@developer.gserviceaccount.com',
keyFile: 'my-service-account-key.pem',
scopes: ['https://www.googleapis.com/auth/drive.readonly']
}, function (err, token) {
console.log(token);
});

I receive the following Error: Error: failed to obtain an authentication token, request failed with HTTP code 401: invalid_client.

I didn't see a clientId in the new service account process, but I might have made a mistake somewhere. Thank you again for your time.

@rainabba
Copy link

rainabba commented Jul 6, 2017

You can find your clientid and secret in the developer console under API Manager, Credentials, Web Application Client for OAuth2 ClientIDs. Once I'm editing the right entry, I see the clientID, secret, JSON download and such at the top of the page and the URL is like: https://console.developers.google.com/apis/credentials/oauthclient/some-guid-specific-to-me.apps.googleusercontent.com?project=my-project-name

I'm attaching a screenshot of what it looks like too.
capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants