> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pub-Sub

> Pub/Sub is a powerful messaging service that enables asynchronous communication between independent systems. It allows applications to decouple the process of sending and receiving messages, making it easier to build scalable and reliable systems.

## Creating a Pub-Sub connection

Create the connection by using one of the following methods:

* [OAuth](#using-oauth)
* [Service Account](#using-service-account)

### Using OAuth

#### Creating your connection

1. In the Blink platform, navigate to the **Connections** page > **Add connection**. A New Connection dialog box opens displaying icons of external service providers available.
2. Select the **Pub-Sub** icon. A dialog box with name of the connection and connection methods appear.
3. (Optional) Edit the name of the connection. At a later stage you cannot edit the name.
4. Click **Google Pub-Sub** to authenticate using OAuth.
5. Sign in using your credentials.

### Using Service Account

To create the connection you need:

* An API Address
* A Credentials
* A Google OAuth 2.0 Scopes

#### Obtaining the credentials

1. In the Google Cloud console, navigate to `Menu` -> `APIs & Services` -> `Credentials`.
2. Click `Create Credentials` -> `Service account`.

#### Creating your connection

1. In the Blink platform, navigate to the **Connections** page > **Add connection**. A New Connection dialog box opens displaying icons of external service providers available.
2. Select the **Pub-Sub** icon. A dialog box with name of the connection and connection methods appear.
3. (Optional) Edit the name of the connection. At a later stage you cannot edit the name.
4. Select **Service Account** as the method to create the connection.
5. Fill in the parameters:
   * The API Address
   * The Credentials
   * The Google OAuth 2.0 Scopes
6. (Optional) Click **Test Connection** to test it.
7. Click **Create connection**. The new connection appears on the **Connections** page.
