This Python package is automatically generated by the OpenAPI Generator project:
- API version: 14.1.0
- Package version: 14.1.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import sunshine_conversations_client
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import sunshine_conversations_client
Sunshine Conversations is available in the following regions. The US region will be used by default. To target any other region, specify the region's API host in Configuration
. For example:
configuration = .Configuration(
host = "https://api.smooch.io"
)
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# 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 HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.ActivitiesApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
conversation_id = '029c31f25a21b47effd7be90' # str | Identifies the conversation.
activity_post = {"author":{"type":"user","userId":"5963c0d619a30a2e00de36b8"},"type":"conversation:read"} # ActivityPost |
try:
# Post Activity
api_response = api_instance.post_activity(app_id, conversation_id, activity_post)
pprint(api_response)
except ApiException as e:
print("Exception when calling ActivitiesApi->post_activity: %s\n" % e)
All URIs are relative to https://api.smooch.io
Class | Method | HTTP request | Description |
---|---|---|---|
ActivitiesApi | post_activity | POST /v2/apps/{appId}/conversations/{conversationId}/activity | Post Activity |
AppKeysApi | create_app_key | POST /v2/apps/{appId}/keys | Create App Key |
AppKeysApi | delete_app_key | DELETE /v2/apps/{appId}/keys/{keyId} | Delete App Key |
AppKeysApi | get_app_key | GET /v2/apps/{appId}/keys/{keyId} | Get App Key |
AppKeysApi | list_app_keys | GET /v2/apps/{appId}/keys | List App Keys |
AppsApi | create_app | POST /v2/apps | Create App |
AppsApi | delete_app | DELETE /v2/apps/{appId} | Delete App |
AppsApi | get_app | GET /v2/apps/{appId} | Get App |
AppsApi | list_apps | GET /v2/apps | List Apps |
AppsApi | update_app | PATCH /v2/apps/{appId} | Update App |
AttachmentsApi | delete_attachment | POST /v2/apps/{appId}/attachments/remove | Delete Attachment |
AttachmentsApi | upload_attachment | POST /v2/apps/{appId}/attachments | Upload Attachment |
ClientsApi | create_client | POST /v2/apps/{appId}/users/{userIdOrExternalId}/clients | Create Client |
ClientsApi | list_clients | GET /v2/apps/{appId}/users/{userIdOrExternalId}/clients | List Clients |
ClientsApi | remove_client | DELETE /v2/apps/{appId}/users/{userIdOrExternalId}/clients/{clientId} | Remove Client |
ConversationsApi | create_conversation | POST /v2/apps/{appId}/conversations | Create Conversation |
ConversationsApi | delete_conversation | DELETE /v2/apps/{appId}/conversations/{conversationId} | Delete Conversation |
ConversationsApi | download_message_ref | POST /v2/apps/{appId}/conversations/{conversationId}/download | Download Message Ref |
ConversationsApi | get_conversation | GET /v2/apps/{appId}/conversations/{conversationId} | Get Conversation |
ConversationsApi | list_conversations | GET /v2/apps/{appId}/conversations | List Conversations |
ConversationsApi | update_conversation | PATCH /v2/apps/{appId}/conversations/{conversationId} | Update Conversation |
CustomIntegrationApiKeysApi | create_custom_integration_key | POST /v2/apps/{appId}/integrations/{integrationId}/keys | Create Integration Key |
CustomIntegrationApiKeysApi | delete_custom_integration_key | DELETE /v2/apps/{appId}/integrations/{integrationId}/keys/{keyId} | Delete Integration Key |
CustomIntegrationApiKeysApi | get_custom_integration_key | GET /v2/apps/{appId}/integrations/{integrationId}/keys/{keyId} | Get Integration Key |
CustomIntegrationApiKeysApi | list_custom_integration_keys | GET /v2/apps/{appId}/integrations/{integrationId}/keys | List Integration Keys |
DevicesApi | get_device | GET /v2/apps/{appId}/users/{userIdOrExternalId}/devices/{deviceId} | Get Device |
DevicesApi | list_devices | GET /v2/apps/{appId}/users/{userIdOrExternalId}/devices | List Devices |
IntegrationsApi | create_integration | POST /v2/apps/{appId}/integrations | Create Integration |
IntegrationsApi | delete_integration | DELETE /v2/apps/{appId}/integrations/{integrationId} | Delete Integration |
IntegrationsApi | get_integration | GET /v2/apps/{appId}/integrations/{integrationId} | Get Integration |
IntegrationsApi | list_integrations | GET /v2/apps/{appId}/integrations | List Integrations |
IntegrationsApi | update_integration | PATCH /v2/apps/{appId}/integrations/{integrationId} | Update Integration |
MessagesApi | delete_all_messages | DELETE /v2/apps/{appId}/conversations/{conversationId}/messages | Delete All Messages |
MessagesApi | delete_message | DELETE /v2/apps/{appId}/conversations/{conversationId}/messages/{messageId} | Delete Message |
MessagesApi | list_messages | GET /v2/apps/{appId}/conversations/{conversationId}/messages | List Messages |
MessagesApi | post_message | POST /v2/apps/{appId}/conversations/{conversationId}/messages | Post Message |
OAuthEndpointsApi | authorize | GET /oauth/authorize | Authorize |
OAuthEndpointsApi | get_token | POST /oauth/token | Get Token |
OAuthEndpointsApi | revoke_access | DELETE /oauth/authorization | Revoke Access |
ParticipantsApi | join_conversation | POST /v2/apps/{appId}/conversations/{conversationId}/join | Join Conversation |
ParticipantsApi | leave_conversation | POST /v2/apps/{appId}/conversations/{conversationId}/leave | Leave Conversation |
ParticipantsApi | list_participants | GET /v2/apps/{appId}/conversations/{conversationId}/participants | List Participants |
SwitchboardActionsApi | accept_control | POST /v2/apps/{appId}/conversations/{conversationId}/acceptControl | Accept Control |
SwitchboardActionsApi | offer_control | POST /v2/apps/{appId}/conversations/{conversationId}/offerControl | Offer Control |
SwitchboardActionsApi | pass_control | POST /v2/apps/{appId}/conversations/{conversationId}/passControl | Pass Control |
SwitchboardActionsApi | release_control | POST /v2/apps/{appId}/conversations/{conversationId}/releaseControl | Release Control |
SwitchboardIntegrationsApi | create_switchboard_integration | POST /v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations | Create Switchboard Integration |
SwitchboardIntegrationsApi | delete_switchboard_integration | DELETE /v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations/{switchboardIntegrationId} | Delete Switchboard Integration |
SwitchboardIntegrationsApi | list_switchboard_integrations | GET /v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations | List Switchboard Integrations |
SwitchboardIntegrationsApi | update_switchboard_integration | PATCH /v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations/{switchboardIntegrationId} | Update Switchboard Integration |
SwitchboardsApi | create_switchboard | POST /v2/apps/{appId}/switchboards | Create Switchboard |
SwitchboardsApi | delete_switchboard | DELETE /v2/apps/{appId}/switchboards/{switchboardId} | Delete Switchboard |
SwitchboardsApi | list_switchboards | GET /v2/apps/{appId}/switchboards | List Switchboards |
SwitchboardsApi | update_switchboard | PATCH /v2/apps/{appId}/switchboards/{switchboardId} | Update Switchboard |
UsersApi | create_user | POST /v2/apps/{appId}/users | Create User |
UsersApi | delete_user | DELETE /v2/apps/{appId}/users/{userIdOrExternalId} | Delete User |
UsersApi | delete_user_personal_information | DELETE /v2/apps/{appId}/users/{userIdOrExternalId}/personalinformation | Delete User Personal Information |
UsersApi | get_user | GET /v2/apps/{appId}/users/{userIdOrExternalId} | Get User |
UsersApi | update_user | PATCH /v2/apps/{appId}/users/{userIdOrExternalId} | Update User |
WebhooksApi | create_webhook | POST /v2/apps/{appId}/integrations/{integrationId}/webhooks | Create Webhook |
WebhooksApi | delete_webhook | DELETE /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} | Delete Webhook |
WebhooksApi | get_webhook | GET /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} | Get Webhook |
WebhooksApi | list_webhooks | GET /v2/apps/{appId}/integrations/{integrationId}/webhooks | List Webhooks |
WebhooksApi | update_webhook | PATCH /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} | Update Webhook |
- AcceptControlBody
- Action
- ActionSubset
- Activity
- ActivityAllOf
- ActivityPost
- ActivityPostAllOf
- ActivityTypes
- Android
- AndroidAllOf
- AndroidUpdate
- AndroidUpdateAllOf
- ApiKey
- App
- AppCreateBody
- AppKey
- AppKeyCreateBody
- AppKeyListResponse
- AppKeyResponse
- AppListFilter
- AppListResponse
- AppResponse
- AppSettings
- AppSubSchema
- AppUpdateBody
- Apple
- AppleAllOf
- AppleMessageOverridePayload
- AppleUpdate
- AppleUpdateAllOf
- AttachmentDeleteBody
- AttachmentResponse
- AttachmentSchema
- AttachmentUploadBody
- Author
- AuthorWebhook
- Buy
- Campaign
- CarouselMessage
- CarouselMessageDisplaySettings
- Client
- ClientAddEvent
- ClientAddEventAllOf
- ClientAddEventAllOfPayload
- ClientAssociation
- ClientCreate
- ClientListResponse
- ClientRemoveEvent
- ClientRemoveEventAllOf
- ClientRemoveEventAllOfPayload
- ClientResponse
- ClientType
- ClientUpdateEvent
- ClientUpdateEventAllOf
- ClientUpdateEventAllOfPayload
- Confirmation
- Content
- Conversation
- ConversationAllOf
- ConversationCreateBody
- ConversationCreateEvent
- ConversationCreateEventAllOf
- ConversationCreateEventAllOfPayload
- ConversationJoinEvent
- ConversationJoinEventAllOf
- ConversationJoinEventAllOfPayload
- ConversationLeaveEvent
- ConversationLeaveEventAllOf
- ConversationLeaveEventAllOfPayload
- ConversationListFilter
- ConversationListResponse
- ConversationMessageDeliveryChannelEvent
- ConversationMessageDeliveryChannelEventAllOf
- ConversationMessageDeliveryFailureEvent
- ConversationMessageDeliveryFailureEventAllOf
- ConversationMessageDeliveryPayload
- ConversationMessageDeliveryPayloadDestination
- ConversationMessageDeliveryPayloadExternalMessages
- ConversationMessageDeliveryPayloadMessage
- ConversationMessageDeliveryUserEvent
- ConversationMessageEvent
- ConversationMessageEventAllOf
- ConversationMessageEventAllOfPayload
- ConversationPostbackEvent
- ConversationPostbackEventAllOf
- ConversationPostbackEventAllOfPayload
- ConversationReadEvent
- ConversationReadEventAllOf
- ConversationReadEventAllOfPayload
- ConversationReferralEvent
- ConversationReferralEventAllOf
- ConversationReferralEventAllOfPayload
- ConversationRemoveEvent
- ConversationRemoveEventAllOf
- ConversationRemoveEventAllOfPayload
- ConversationResponse
- ConversationTruncated
- ConversationType
- ConversationTypingEvent
- ConversationTypingEventAllOf
- ConversationTypingEventAllOfPayload
- ConversationUpdateBody
- Custom
- CustomAllOf
- CustomUpdate
- DefaultResponder
- DefaultResponderDefaultResponder
- DefaultResponderId
- Destination
- Device
- DeviceListResponse
- DeviceResponse
- DownloadMessageRefBody
- DownloadMessageRefBodyAllOf
- DownloadMessageRefBodyAllOfApple
- DownloadMessageRefBodyAllOfAppleInteractiveDataRef
- EventSubSchema
- ExtraChannelOptions
- ExtraChannelOptionsMessenger
- Field
- FileMessage
- FormMessage
- FormMessageField
- FormMessageFieldAllOf
- FormResponseMessage
- FormResponseMessageField
- FormResponseMessageFieldAllOf
- Identity
- ImageMessage
- InlineObject
- InstagramAllOf
- InstagramUpdate
- InstagramUpdateAllOf
- Integration
- IntegrationApiKey
- IntegrationApiKeyListResponse
- IntegrationApiKeyResponse
- IntegrationId
- IntegrationListFilter
- IntegrationListResponse
- IntegrationResponse
- IntegrationType
- IntegrationUpdate
- IntegrationUpdateBase
- Ios
- IosAllOf
- IosUpdate
- IosUpdateAllOf
- Item
- Line
- LineAllOf
- LineUpdate
- Link
- Links
- ListMessage
- LocationMessage
- LocationMessageCoordinates
- LocationMessageLocation
- LocationRequest
- Mailgun
- MailgunAllOf
- MailgunUpdate
- MailgunUpdateAllOf
- MatchCriteria
- MatchCriteriaBase
- MatchCriteriaMailgun
- MatchCriteriaMailgunAllOf
- MatchCriteriaMessagebird
- MatchCriteriaMessagebirdAllOf
- MatchCriteriaTwilio
- MatchCriteriaTwilioAllOf
- MatchCriteriaWhatsapp
- MatchCriteriaWhatsappAllOf
- Message
- MessageBirdUpdate
- MessageListResponse
- MessageOverride
- MessageOverrideApple
- MessageOverrideLine
- MessageOverrideMessenger
- MessageOverridePayload
- MessageOverrideWhatsapp
- MessagePost
- MessagePostResponse
- MessageWebhook
- Messagebird
- MessagebirdAllOf
- Messenger
- MessengerAllOf
- MessengerUpdate
- Meta
- OfferControlBody
- Page
- Participant
- ParticipantJoinBody
- ParticipantLeaveBody
- ParticipantLeaveBodyParticipantId
- ParticipantLeaveBodyUserExternalId
- ParticipantLeaveBodyUserId
- ParticipantListResponse
- ParticipantResponse
- ParticipantSubSchema
- ParticipantWithUserExternalId
- ParticipantWithUserId
- PassControlBody
- Postback
- PostbackWebhook
- PrechatCapture
- Profile
- QuotedMessage
- QuotedMessageExternalMessageId
- QuotedMessageMessage
- Referral
- ReferralDetails
- Reply
- Source
- SourceWebhook
- SourceWithCampaignWebhook
- SourceWithCampaignWebhookAllOf
- Status
- Switchboard
- SwitchboardAcceptControl
- SwitchboardAcceptControlAllOf
- SwitchboardAcceptControlAllOfPayload
- SwitchboardAcceptControlFailure
- SwitchboardAcceptControlFailureAllOf
- SwitchboardAcceptControlFailureAllOfPayload
- SwitchboardIntegration
- SwitchboardIntegrationCreateBody
- SwitchboardIntegrationListResponse
- SwitchboardIntegrationResponse
- SwitchboardIntegrationUpdateBody
- SwitchboardIntegrationWebhook
- SwitchboardListResponse
- SwitchboardOfferControl
- SwitchboardOfferControlAllOf
- SwitchboardOfferControlAllOfPayload
- SwitchboardOfferControlFailure
- SwitchboardPassControl
- SwitchboardPassControlAllOf
- SwitchboardPassControlAllOfPayload
- SwitchboardPassControlFailure
- SwitchboardResponse
- SwitchboardUpdateBody
- Target
- Telegram
- TelegramAllOf
- TelegramUpdate
- TemplateMessage
- TextMessage
- Twilio
- TwilioAllOf
- TwilioUpdate
- TwitterAllOf
- TwitterUpdate
- Unity
- UnityAllOf
- UnityUpdate
- UnityUpdateAllOf
- User
- UserAllOf
- UserCreateBody
- UserMergeEvent
- UserMergeEventAllOf
- UserMergeEventAllOfPayload
- UserMergeEventAllOfPayloadMergedClients
- UserMergeEventAllOfPayloadMergedConversations
- UserMergeEventAllOfPayloadMergedUsers
- UserResponse
- UserTruncated
- UserUpdateBody
- UserUpdateEvent
- UserUpdateEventAllOf
- UserUpdateEventAllOfPayload
- Viber
- ViberAllOf
- ViberUpdate
- Web
- WebAllOf
- WebUpdate
- WebUpdateAllOf
- Webhook
- WebhookBody
- WebhookCreateBody
- WebhookListResponse
- WebhookResponse
- WebhookSubSchema
- Webview
- WhatsAppUpdate
- WhatsAppUpdateAllOf
- WhatsappAllOf
- Type: HTTP basic authentication
- Type: Bearer authentication (JWT)