SurveyGizmo API Wrapper

raw JSON →
1.2.3 verified Fri May 01 auth: no python

A Python wrapper for SurveyGizmo's (now Alchemer) RESTful API service. Current version 1.2.3 wraps most survey, campaign, contact, and response endpoints. Release cadence is sporadic; last release was 2020.

pip install surveygizmo
error AttributeError: module 'surveygizmo' has no attribute 'SurveyGizmoApi'
cause Importing the wrong class name.
fix
Use 'from surveygizmo import SurveyGizmo'
error ImportError: cannot import name 'SurveyGizmo' from 'surveygizmo'
cause Outdated library version or incorrect installation.
fix
Upgrade: 'pip install --upgrade surveygizmo'. Ensure package version >= 0.2.0.
error TypeError: __init__() missing 1 required positional argument: 'api_token_secret'
cause OAuth1.0 requires both token and secret.
fix
Provide both 'api_token' and 'api_token_secret' arguments when creating SurveyGizmo instance.
error HTTP 401: Unauthorized
cause Invalid OAuth credentials or expired tokens.
fix
Verify your API token and secret in SurveyGizmo account settings. Tokens may expire; regenerate if needed.
error surveygizmo.exceptions.MissingCredentials
cause API credentials not set via environment variables or constructor arguments.
fix
Set 'SURVEYGIZMO_API_TOKEN' and 'SURVEYGIZMO_API_TOKEN_SECRET' environment variables, or pass them directly to SurveyGizmo().
breaking Version 0.2.0 renamed all 'change' operations to 'update'. Code using 'api.survey.change(...)' will break.
fix Replace 'change' with 'update' for all resource methods.
breaking Version 0.2.0 removed the 'keep' kwarg for preserving filters. Use 'preserve_filters' instead.
fix Replace 'keep=True' with 'preserve_filters=True' when calling API methods.
breaking Version 0.2.0 removed the undocumented 'url_fetch' kwarg.
fix Remove 'url_fetch' kwarg; it no longer has any effect.
deprecated SurveyGizmo renamed to Alchemer. API endpoints and tokens may change; this wrapper may not be updated.
fix Consider migrating to Alchemer's official SDK: https://apihelp.alchemer.com/
gotcha The library uses 'api_token' and 'api_token_secret' (OAuth1.0), not a modern API key. Obtain credentials from SurveyGizmo account settings.
fix Use the v1.0 OAuth token/secret pair, not a bearer token.
gotcha The 'SurveyGizmo' class wraps methods under 'api' attribute. Methods like 'list', 'get', 'update', 'delete' are called on resource objects via 'api.survey.list()'.
fix Access resources via 'api.api.<resource>.<method>()' after initializing 'SurveyGizmo' instance.

Initialize with API token and secret, then call any resource method.

from surveygizmo import SurveyGizmo

api = SurveyGizmo(api_token='your_api_token', api_token_secret='your_api_secret')
surveys = api.api.survey.list()
print(surveys)