The PostZen Public API lets server-side integrations manage profiles, connected social accounts, OAuth connection flows, media uploads, and post creation.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.23.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.10+
pip install postzen-sdkThen import the package:
import postzenpip install git+https://github.com/postzen-dev/postzen-python.gitExecute pytest to run the tests.
Please follow the installation procedure and then run the following:
import postzen
from postzen.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.postzen.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = postzen.Configuration(
host = "https://api.postzen.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = postzen.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with postzen.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = postzen.AccountsApi(api_client)
account_id = 'account_id_example' # str | PostZen account id.
try:
# Disconnect an account
api_response = api_instance.disconnect_account(account_id)
print("The response of AccountsApi->disconnect_account:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountsApi->disconnect_account: %s\n" % e)All URIs are relative to https://api.postzen.dev
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AccountsApi | disconnect_account | DELETE /v1/accounts/{accountId} | Disconnect an account |
| AccountsApi | list_accounts | GET /v1/accounts | List accounts |
| ConnectApi | complete_connect | POST /v1/connect/{platform} | Complete an OAuth connection |
| ConnectApi | create_connect_url | GET /v1/connect/{platform} | Create an OAuth connect URL |
| MediaApi | create_media_presign | POST /v1/media/presign | Create a presigned media upload URL |
| PostsApi | create_post | POST /v1/posts | Create a post |
| ProfilesApi | create_profile | POST /v1/profiles | Create a profile |
| ProfilesApi | delete_profile | DELETE /v1/profiles/{profileId} | Delete a profile |
| ProfilesApi | get_profile | GET /v1/profiles/{profileId} | Get a profile |
| ProfilesApi | list_profiles | GET /v1/profiles | List profiles |
| ProfilesApi | update_profile | PUT /v1/profiles/{profileId} | Update a profile |
- Account
- AccountProfileSummary
- AccountsListResponse
- ApiPost
- ApiPostAccount
- ApiPostPlatformResult
- ConnectCompleteErrorResponse
- ConnectCompleteRequest
- ConnectCompleteResponse
- ConnectStartResponse
- CreatePostReplayResponse
- CreatePostRequest
- CreatePostResponse
- CreatePostTarget
- ErrorResponse
- FacebookSettings
- InstagramSettings
- InstagramSettingsUserTagsInner
- LinkedInSettings
- MediaPresignRequest
- MediaPresignResponse
- MessageResponse
- Pagination
- PaymentRequiredError
- PaymentRequiredErrorDetails
- PinterestSettings
- PostMediaItem
- PostPlatformSettings
- Profile
- ProfileCreateRequest
- ProfileResponse
- ProfileUpdateRequest
- ProfileWriteResponse
- ProfilesListResponse
- PublicPlatformInput
- PublicPlatformOutput
- ThreadsSettings
- TikTokSettings
- XSettings
- YouTubeSettings
- YouTubeSettingsTags
Authentication schemes defined for the API:
- Type: Bearer authentication