---
title: Subscribers
description: Learn what subscribers are and how to create them.
documentId: subscribers
locale: en-US
---

Subscribers are the applications or partners that receive events distributed by the Events Hub.

To receive events, subscribers must be connected to topics, which are grouped within [handlers](/docs/events-hub/handlers).
Each topic can have different contexts available for the subscriber.
Thus, when events are sent to a topic with a defined context, only the subscribers of that topic with the enabled context will receive the events.

The Events Hub ensures security, providing subscribers with a reliable source of messages.

<Callout type="TIP" title="TIP">
- Read more about topics on the [handlers](/docs/events-hub/handlers) page.  
- Understand [contexts](/docs/events-hub/contexts).
- Access the [security documentation](/docs/events-hub/subscribers-security-keys) to learn how it works.
</Callout>

The **Subscribers** screen lists all registered subscribers and allows you to create new ones:

![Subscribers screen](https://creative-ball-51b3fc85c0.media.strapiapp.com/subscriber_screen_eb7780d2aa.png)

>**Filters**
><br/>
>You can search for a specific subscriber using the filters at the top of the page. They allow you to search by:
>
>- Subscriber name.
>
>- Developer's email.
>
>- Handler name.
>
>- Creation start and end dates.
>
>- Status.
><br/>
>Use the **Order by** field to define the list order. You can choose to view by the most recent or oldest creation date, or alphabetically.

To view the details of a specific subscriber, click on the name in the list.
You will be directed to the **Topics** screen, where you can edit the subscriber's information and enable or disable the topics they receive events from.

![Subscriber topics editing](https://creative-ball-51b3fc85c0.media.strapiapp.com/topics_subscriber_edit_b2f5596994.png)

## Creating subscribers

To create a subscriber, click the **+** button in the bottom-right corner of the screen.
The registration process consists of four steps:

![Registration steps](https://creative-ball-51b3fc85c0.media.strapiapp.com/etapas_subscriber_2f600a17de.png)

### Overview

To start the registration, fill in the fields:

- **Name**: the subscriber's name, which must be unique.

- **Status**: state, which can be approved, pending, rejected, or cancelled.

- **Description**: optional field to include a description.

- **Developer**: email of the developer responsible for the subscriber.

### Security

In this step, you ensure the security of the connection between subscribers and the Events Hub.

<Callout type="TIP" title="TIP">
Access the [Security and Keys documentation](/docs/events-hub/subscribers-security-keys) to understand how it works.
</Callout>

Below are the two layers of security implemented:

- **Digital signature**
- **Static or dynamic token**

<Tabs defaultTab="signature">
    <TabList label="security">
        <Tab tabId="signature">Digital signature</Tab>
        <Tab tabId="token">Static or dynamic token</Tab>
    </TabList>
    <TabPanel tabId="signature">
        #### Digital signature

When distributing events to subscribers, we include a digital signature that allows the subscriber to validate the request's origin.

To generate this signature, you need to validate a shared key between the Events Hub and the subscriber.

Follow these steps:

<Steps>
    <Step>
     Enter a key of your choice (between 32 and 255 characters)  in the **Key** field.  
     - If the validation time expires, click the ![Refresh icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/icon_refresh_0b0b67afd3.png) icon to restart the timer.
    </Step>
    <Step>
     To validate the key, click **VALIDATE KEY**.
     If successful, you will see the message **Post key URL validated** ![Validation success](https://creative-ball-51b3fc85c0.media.strapiapp.com/url_validated_e68ab9e4ce.png) on the Security screen.
    </Step>
</Steps>

<Callout type="IMPORTANT" title="IMPORTANT">
If you register a subscriber without validating the shared key, it will not be possible to link it to any topic.
A subscriber can only be linked to a topic after key validation.  
</Callout>

    </TabPanel>
    <TabPanel tabId="token">
        #### Static or dynamic token

After sending the shared key, you can also include a **static or dynamic token** to be used in requests to subscribers.

![Token registration](https://creative-ball-51b3fc85c0.media.strapiapp.com/token_registration_29bdeddde6.jpeg)

<Callout type="TIP" title="TIP">
Token configuration is optional.
Learn how they work and the differences between static and dynamic tokens in the [Tokens documentation](/docs/events-hub/subscribers-security-keys#security-token-options). 
</Callout>

To configure a token, follow these steps:

<Steps>
    <Step>
     Click the **CONFIGURE TOKEN** button.
     </Step>
    <Step>
     Select the token type: Static or Dynamic.
     </Step>
    <Step>
     In the **Location** field, select where the token should be passed in the request.
     Options are header or query param.
     </Step>
    <Step>
        In the **Name** field, specify the name under which the token value will be passed.
     </Step>
    <Step>
        Depending on the token type selected, configure:
        - **Token SHA-256**: token value. You can generate a random token using the ![Token icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/icon_token_5cf301c4e2.png) icon.
        After saving, the token will be displayed only once in a modal window. Copy and save it to a file on your computer.
        - **OAuth URL**: URL for generating the token value.
        After saving, a request will be sent to the subscriber's URL to generate the token and validate the configuration.
     </Step>
</Steps>

<Callout type="IMPORTANT" title="IMPORTANT">
You can configure only one token per subscriber.
</Callout>

If a token is configured, the screen will display its details:

![Token details](https://creative-ball-51b3fc85c0.media.strapiapp.com/token_post_validate_97bf1808f6.png)

    </TabPanel>
</Tabs>

### Topics

In the **TOPICS** tab, you link the subscriber to the topics they will receive events from.
Registered topics are displayed through the handlers.

* You can search for specific handlers using the **Keywords** field, which searches for terms used in the handler's name or description.
Additionally, you can reorder the list by name or creation date using the **Order by** field.

To link topics to your subscriber, follow these steps:

<Steps>
    <Step>
     Select a handler and click the ![View topics icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/icon_view_topics_e993628732.png) icon in the **View Topics** column.
     </Step>
    <Step>
     In the screen that opens, click the ![Expand icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/icon_expand_62b33f1187.png) icon and also enable the context for the subscriber.
     </Step>
    <Step>
     In the **Subscriber URL** field, enter the URL that will receive the events.
     </Step>
    <Step>
     In the **Status Code** field, specify the success status code that should be returned.
     This field only allows codes from `200` to `299`. You can enter `2xx` to cover the entire range.
     </Step>
</Steps>

The Events Hub will make a request to validate the URL, expecting the specified code.

<Callout type="WARNING" title="WARNING">
If the URL is not validated, the subscriber will be registered but will not receive events.
</Callout>

<Callout type="IMPORTANT" title="IMPORTANT">
When sending events to the subscriber, the Events Hub will consider the code you defined as success in the Status Code field.
If you specify code 204 and return 200, the system will interpret it as a delivery failure and send the event to the Delivery Retry queue.
To avoid this, specify 2xx in the Status Code field.
This way, any code in the 200 family will be interpreted as success.
</Callout>

![Adding topics to subscriber](https://creative-ball-51b3fc85c0.media.strapiapp.com/add_topic_subscriber_ea238cfd58.gif)

Each selected topic will be listed in the **SUBSCRIBED TOPICS** section. To remove the link, click the trash icon.

The **STATUS** column indicates whether the URL was successfully validated or not.
The green icon represents success. The gray icon means the URL was registered but validation failed.

![URL validation](https://creative-ball-51b3fc85c0.media.strapiapp.com/subscriber_enabled_subscripition_abcf9d78f7.gif)

### Review

The final step of registering a subscriber displays the registered data:

![Subscriber review](https://creative-ball-51b3fc85c0.media.strapiapp.com/review_subscriber_139901b589.gif)
