---
source_url: https://www.pubnub.com/docs/sdks/asyncio/faq
title: FAQ for Python-Asyncio SDK
updated_at: 2026-06-02T11:33:13.583Z
sdk_name: PubNub Python Asyncio SDK
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# FAQ for Python-Asyncio SDK

PubNub Python Asyncio SDK

Install:

```bash
pip install pubnub
```

Check out the frequently asked questions about the PubNub Python-Asyncio SDK.

## Can I use the synchronous Python client alongside Asyncio?

Yes. Use the `PubNub` client for synchronous workflows and `PubNubAsyncio` for asynchronous workflows. Keep the clients initialized separately to avoid event loop conflicts.

## Why is a user ID required?

The User ID uniquely identifies the client (end user, device, or server). Set and persist a stable value for the lifetime of the user or device; without it, the client cannot connect.

## How do I enable Transport Layer Security?

Set `pnconfig.ssl = True` during configuration. This enables Transport Layer Security (TLS) for all communications with PubNub.

## How do I choose a custom HTTP request handler?

Provide `custom_request_handler` when initializing `PubNubAsyncio`. If not specified, the SDK checks the `PUBNUB_ASYNC_REQUEST_HANDLER` environment variable and defaults to `AsyncHttpxRequestHandler` if unset or invalid.

## Why am I not receiving messages after subscribing?

Messages published before the `subscribe()` call are not delivered by default. Ensure your app subscribes before publishing, or use features like history to retrieve previous messages when applicable.

## Can I subscribe to multiple channels at once?

Yes. Use a `SubscriptionSet` to manage multiple `Subscription`s together, or use wildcard subscriptions or channel groups where supported.

## How do I filter messages server-side?

Use `pnconfig.filter_expression` to set a filter expression. The Stream Controller add-on must be enabled for your keyset.

## How do I grant access with Access Manager?

Use the `secret_key` only on secure server-side platforms. The client signs Access Manager messages with the `secret_key`. Never expose this key in client-side code.

## How do I troubleshoot connection issues?

Check status events such as `PNConnectionErrorCategory` and `PNUnexpectedDisconnectCategory`. For details, refer to [Status Events](https://www.pubnub.com/docs/sdks/asyncio/status-events) in the Asyncio documentation.

## Terms in this document

* **PubNub** - PubNub is a real-time messaging platform that provides APIs and SDKs for building scalable applications. It handles the complex infrastructure of real-time communication, including: Message delivery and persistence, Presence detection, Access control, Push notifications, File sharing, Serverless processing with Functions and Events & Actions, Analytics and monitoring with BizOps Workspace, AI-powered insights with Illuminate.