{"id":24602,"library":"smsapi-client","title":"SmsAPI Python Client","description":"Official Python client library for the SmsAPI platform, enabling sending SMS, MMS, VMS, and managing phone numbers, contacts, and SMS templates. The current version is 2.9.6, with regular updates following the release cadence of the underlying API.","status":"active","version":"2.9.6","language":"python","source_language":"en","source_url":"https://github.com/smsapi/smsapi-python-client","tags":["sms","api","client","messaging"],"install":[{"cmd":"pip install smsapi-client","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false},{"reason":"Python 2/3 compatibility","package":"six","optional":true}],"imports":[{"note":"Importing the top-level smsapi module does not expose SmsApi directly; use the subpackage.","wrong":"import smsapi","symbol":"SmsApi","correct":"from smsapi.client import SmsApi"}],"quickstart":{"code":"from smsapi.client import SmsApi\n\nclient = SmsApi(username=os.environ.get('SMSAPI_USERNAME', ''),\n                password=os.environ.get('SMSAPI_PASSWORD', ''))\n\nresult = client.sms.send(to='48123456789', message='Hello from SmsAPI!')\nprint(result)","lang":"python","description":"Initialize the client with your credentials and send a simple SMS. Both can be passed as arguments or set via environment variables."},"warnings":[{"fix":"Use your SmsAPI account username and password (or API password) – not an API token directly.","message":"The SmsApi constructor requires both username and password; these are not API tokens. Do not confuse with the API token authentication used in other SMS API libraries.","severity":"gotcha","affected_versions":"all"},{"fix":"Always check the response's error attribute or catch exceptions before accessing result properties.","message":"After sending a message, the response object's properties (e.g., .id, .points, .status) are only available if the send was successful. Accessing them on failure may raise AttributeError.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.6+ and use the latest version of the library.","message":"Python 2 support is deprecated; the library may be removed in future versions.","severity":"deprecated","affected_versions":"2.9.x"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install the correct package: pip install smsapi-client, then import from smsapi.client import SmsApi.","cause":"The library is installed as 'smsapi-client' on PyPI but the import path uses 'smsapi' (package name).","error":"ImportError: No module named smsapi"},{"fix":"Check result.success or result.error before accessing result.id. Use: if result.success: print(result.id)","cause":"Attempting to access response details on a failed send response. The response object does not have the 'id' attribute when the request fails.","error":"AttributeError: 'SmsApiResponse' object has no attribute 'id'"},{"fix":"Use SmsApi(username='your_username', password='your_password') instead of passing an API token.","cause":"The SmsApi constructor does not accept a 'token' parameter; it expects 'username' and 'password'.","error":"TypeError: __init__() got an unexpected keyword argument 'token'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}