You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. You will now need to set up [authentication](https://cloud.google.com/docs/authentication/) and a
44
44
[service account](https://cloud.google.com/docs/authentication/#service_accounts) in order to access
45
45
Pub/Sub via gRPC APIs as described [here](https://cloud.google.com/iam/docs/creating-managing-service-accounts).
46
-
Assign the [role](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts)`Project -> Owner`
46
+
(**Note:** This step is unnecessary on Google platforms (Google App Engine / Google Cloud Shell / Google Compute Engine) as it will
47
+
automatically use the in-built Google credentials). Assign the [role](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts)`Project -> Owner`
47
48
and for Key type select JSON. Once you click `Create`, a JSON file containing your key is downloaded to
48
49
your computer. Note down the path of this file or copy this file to the computer and file system where
49
50
you will be running the example application as described later. Assume this JSON file is available at
50
-
`/path/to/JSON/file`. You can also use the `gcloud` shell commands to
51
-
[create the service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts#iam-service-accounts-create-gcloud)
52
-
and [the JSON file](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-gcloud).
51
+
`/path/to/JSON/file` Set the value of the environment variable GOOGLE_APPLICATION_CREDENTIALS to this file path. You can also use the `gcloud` shell commands to
52
+
[create the service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts#iam-service-accounts-create-gcloud).
53
53
54
54
#### To build the examples
55
55
@@ -62,19 +62,18 @@ $ ../gradlew installDist
62
62
63
63
64
64
#### How to run the example:
65
-
`google-auth-client` requires two command line arguments for the location of the JSON file and the project ID:
65
+
`google-auth-client` requires one command line argument for the project ID:
0 commit comments