# Google Pub Sub (prebuilt connector)

## Description

**Google Pub Sub** is used for streaming analytics and data integration pipelines to load and distribute data.

## API documentation

API documentation for **Google Pub Sub** (used to build this connector) can be found via the link below:

{% embed url="<https://cloud.google.com/pubsub/docs/reference/service_apis_overview>" %}

## Authentication&#x20;

When adding connector instances for **Google Pub Sub**, the following authentication methods are supported:

* [OAuth 2 (authorisation code)](#oauth-2-authorisation-code)

### OAuth 2 (authorisation code)

When a user chooses to [add a connector instance](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance) using **OAuth 2 (authorisation code)** authentication, the credentials below are prompted:

<table><thead><tr><th>Credential</th><th data-type="checkbox">Required?</th><th>Notes</th></tr></thead><tbody><tr><td><code>State length</code></td><td>true</td><td>This is a numeric value which determines the length of a random string generated (behind the scenes) during the OAuth process, for verification purposes. Our suggested setting is <code>50</code>.</td></tr><tr><td><code>Scope</code></td><td>true</td><td>Leave set to <code>https://www.googleapis.com/auth/pubsub</code></td></tr><tr><td><code>Client ID</code></td><td>true</td><td>The client ID generated for Patchworks in Google Pub Sub.</td></tr><tr><td><code>Client secret</code></td><td>true</td><td>The client secret generated for Patchworks in Google Pub Sub.</td></tr><tr><td><code>Response authentication token  key</code></td><td>true</td><td>Leave set to the default <code>access_token</code>.</td></tr><tr><td><code>Grant type</code></td><td>true</td><td>Leave set to the default  <code>authorization_code</code>.</td></tr><tr><td><code>Response type key</code></td><td>true</td><td>Leave set to the default  <code>code</code>.</td></tr><tr><td><code>Refresh grant type</code></td><td>true</td><td>Leave set to the default  <code>refresh_token</code>.</td></tr><tr><td><code>Response refresh token key</code></td><td>true</td><td>Leave set to the default  <code>refresh_token</code>.</td></tr></tbody></table>
