Infobip
raw JSON → 6.0.0 verified Tue May 12 auth: no python install: verified quickstart: stale
Official Python client for Infobip communications APIs (SMS, WhatsApp, Email, Voice). Current version is 6.0.0 (Jan 2026). Requires Python >=3.9. Auto-generated from OpenAPI spec — every major version contains breaking changes. Requires account-specific base URL (not a generic endpoint). Two separate packages exist: the official infobip-api-python-client and the community infobip-api-python-sdk.
pip install infobip-api-python-client Common errors
error ModuleNotFoundError: No module named 'infobip_api_client' ↓
cause The `infobip-api-python-client` package is either not installed, or there's a typo in the import statement, or developers might be trying to import from the incorrect package (e.g., confusing it with `infobip-api-python-sdk`).
fix
Ensure the correct package is installed using
pip install infobip-api-python-client and verify that import statements correctly reference infobip_api_client (e.g., from infobip_api_client.api_client import ApiClient). error NameError: name 'InfobipApiClient' is not defined ↓
cause This error typically occurs when the `ApiClient` class is imported without aliasing it as `InfobipApiClient`, or the alias is misspelled, preventing the code from recognizing the name.
fix
Correctly import and alias the
ApiClient class using from infobip_api_client.api_client import ApiClient as InfobipApiClient. error ValueError: Missing required parameter `host` or `api_key` when initializing Configuration. ↓
cause The `Configuration` object, essential for client setup, requires both a specific `host` (your Infobip base URL) and an `api_key` for authentication, and these were not provided during initialization.
fix
Initialize the
Configuration object with your account-specific host (base URL) and api_key from your Infobip account, for example: client_config = Configuration(host="<YOUR_BASE_URL>", api_key="<YOUR_API_KEY>"). error ValueError: Host URL must be HTTPS. ↓
cause Starting with version 6.0.0, the `infobip-api-python-client` library strictly enforces the use of HTTPS for the API host URL, and explicitly providing an `http://` URL will raise this error.
fix
Update your host URL to use
https:// instead of http:// (e.g., https://<YOUR_BASE_URL>). The SDK will automatically prefix URLs without a protocol with https://. error AttributeError: 'Configuration' object has no attribute 'api_key_prefix' ↓
cause This `AttributeError` is a common symptom of breaking changes introduced in version 6.0.0 of the library, specifically the deprecation and removal of the `api_key_prefix` attribute from the `Configuration` object.
fix
Remove the
api_key_prefix parameter from your Configuration initialization, as it is no longer required or supported when providing the api_key and host directly. Warnings
breaking Every major version of infobip-api-python-client contains breaking changes. The library is auto-generated from OpenAPI spec — model names, method signatures, and endpoint paths change between versions. Code written for v3 will not work on v5 or v6. ↓
fix Pin the version in requirements.txt. Read the CHANGELOG before upgrading: https://github.com/infobip/infobip-api-python-client/releases
breaking Account-specific base URL is required. Using a generic URL like https://api.infobip.com causes authentication failures. Each Infobip account has a unique subdomain assigned at account creation. ↓
fix Find your base URL at app.infobip.com under API Keys or the API Resource Hub. Format: https://XXXXX.api.infobip.com
breaking SMS API endpoint changed: /sms/3/messages (V3) replaced /sms/2/text/advanced (V2) in v5.x. Email API /email/4/messages (V4) replaced /email/3/send (V3). Old endpoint paths and corresponding SDK methods are removed. ↓
fix Update to the v3 SMS methods (send_sms_message) and v4 email methods. Check the CHANGELOG for exact method name changes.
breaking Python 3.8 support dropped in v6.0. Minimum is now Python 3.9. ↓
fix Pin infobip-api-python-client<6.0 for Python 3.8 environments.
breaking HTTPS enforcement added in v6.0. Passing http:// as the host URL now raises ValueError at configuration time. ↓
fix Always use https:// in the host URL. Remove any http:// base URLs from configuration.
gotcha Two separate packages exist: infobip-api-python-client (official, auto-generated, breaking changes each major) and infobip-api-python-sdk (community, different API style, last updated 2023). They have different import patterns and are not interchangeable. ↓
fix Use infobip-api-python-client for the latest official API coverage. The community SDK (infobip-api-python-sdk) is unmaintained and missing recent endpoints.
breaking infobip-api-python-client v6.0.0+ requires Pydantic v2.x. An 'ImportError: cannot import name 'validate_call' from 'pydantic'' will occur if Pydantic v1.x is present in the environment. ↓
fix Ensure Pydantic v2.x (e.g., 'pydantic>=2') is installed. If Pydantic v1.x is present, it must be uninstalled first (e.g., 'pip uninstall pydantic' then 'pip install pydantic>=2') to resolve the conflict. Using a clean virtual environment is recommended.
breaking Some transitive dependencies of infobip-api-python-client (e.g., 'regex') require system build tools like 'gcc' to compile C extensions during installation. This commonly occurs in minimal environments like Alpine Linux, leading to a build failure. ↓
fix Ensure that your environment includes the necessary build tools. For Alpine Linux, install 'build-base' (e.g., 'apk add build-base'). For Debian/Ubuntu, install 'build-essential' (e.g., 'apt-get install build-essential').
Install
pip install infobip-api-python-sdk Install compatibility verified last tested: 2026-05-12
python os / libc variant status wheel install import disk
3.10 alpine (musl) infobip-api-python-client - - 10.39s 42.4M
3.10 alpine (musl) infobip-api-python-sdk - - - -
3.10 slim (glibc) infobip-api-python-client - - 7.29s 42M
3.10 slim (glibc) infobip-api-python-sdk - - - -
3.11 alpine (musl) infobip-api-python-client - - 14.30s 47.8M
3.11 alpine (musl) infobip-api-python-sdk - - - -
3.11 slim (glibc) infobip-api-python-client - - 12.38s 47M
3.11 slim (glibc) infobip-api-python-sdk - - - -
3.12 alpine (musl) infobip-api-python-client - - 10.35s 38.7M
3.12 alpine (musl) infobip-api-python-sdk - - - -
3.12 slim (glibc) infobip-api-python-client - - 10.45s 38M
3.12 slim (glibc) infobip-api-python-sdk - - - -
3.13 alpine (musl) infobip-api-python-client - - 9.43s 38.3M
3.13 alpine (musl) infobip-api-python-sdk - - - -
3.13 slim (glibc) infobip-api-python-client - - 9.95s 38M
3.13 slim (glibc) infobip-api-python-sdk - - - -
3.9 alpine (musl) infobip-api-python-client - - 9.23s 41.9M
3.9 alpine (musl) infobip-api-python-sdk - - - -
3.9 slim (glibc) infobip-api-python-client - - 8.57s 42M
3.9 slim (glibc) infobip-api-python-sdk - - - -
Imports
- infobip_api_client wrong
# Using generic Infobip URL instead of account-specific URL: configuration = Configuration( host='https://api.infobip.com' # wrong — fails auth )correctfrom infobip_api_client.api.sms_api import SmsApi from infobip_api_client.api_client import ApiClient, Configuration from infobip_api_client.models import SmsAdvancedTextualRequest, SmsDestination, SmsTextualMessage # Account-specific base URL required — not a generic URL configuration = Configuration( host='https://ACCOUNT_BASE_URL.api.infobip.com', # from Infobip dashboard api_key={'APIKeyHeader': 'App YOUR_API_KEY'} ) with ApiClient(configuration) as api_client: api_instance = SmsApi(api_client) request = SmsAdvancedTextualRequest( messages=[SmsTextualMessage( destinations=[SmsDestination(to='+14155551234')], from_='InfoSMS', text='Hello World!' )] ) response = api_instance.send_sms_message(sms_advanced_textual_request=request)
Quickstart stale last tested: 2026-04-23
from infobip_api_client.api.sms_api import SmsApi
from infobip_api_client.api_client import ApiClient, Configuration
from infobip_api_client.models import (
SmsAdvancedTextualRequest,
SmsDestination,
SmsTextualMessage
)
# Get base_url from: app.infobip.com → API Keys
configuration = Configuration(
host='https://XXXXX.api.infobip.com',
api_key={'APIKeyHeader': 'App YOUR_API_KEY'}
)
with ApiClient(configuration) as api_client:
sms_api = SmsApi(api_client)
request = SmsAdvancedTextualRequest(
messages=[
SmsTextualMessage(
destinations=[SmsDestination(to='+14155551234')],
from_='InfoSMS',
text='Hello from Infobip!'
)
]
)
response = sms_api.send_sms_message(
sms_advanced_textual_request=request
)
print(response.messages[0].message_id)