1# Google Cloud Pubsub example 2 3This example will attempt to fetch a list of topics using the google 4gRPC protobuf specification. This will use an OAuth token and TLS to 5fetch the list of topics. 6 7First, you must generate a access token via the [OAuth playground]. From here 8select the `Cloud Pub/Sub API v1` and its urls as the scope. This will start 9the OAuth flow. Then you must hit the `Exchange authorization code for tokens` 10button to generate an `access_token` which will show up in the HTTP response 11to the right under the `access_token` field in the response json. 12 13Once, you have this token you must fetch your GCP project id which can be found 14from the main page on the dashboard. When you have both of these items you can 15run the example like so: 16 17```shell 18GCP_AUTH_TOKEN="<access-token>" cargo run --bin gcp-client -- <project-id> 19``` 20 21[OAuth playground]: https://developers.google.com/oauthplayground/ 22