Skip to content

Python library for communicating with Engagespot REST API

License

Notifications You must be signed in to change notification settings

Engagespot/engagespot-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the official Python library for communicating with Engagespot REST API. Send multi-channel notifications from your python app.

Installation

pip install engagespot

Prerequisites

You need Engagespot API KEY and API SECRET from your dashboard to get started. If you don't have one, just get one for free.

Creating or updating a user

Before you can send a notification, you should create the user (recipient) profile in Engagespot.

from engagespot import Engagespot

client = Engagespot(api_key="ENGAGESPOT_API_KEY", api_secret="ENGAGESPOT_API_SECRET", data_region="us")

user_profile = {
    "name" : "Python User",
    "email" : "[email protected]",
    "phoneNumber": "+1620000000"
}

response = client.create_or_update_user("user-identifier");

data_region can be either us or eu depending on your workspace data region

Triggering a workflow

The easiest way to send notifications in Engagespot is by creating message workflows in Engagespot console and trigger it using this Python library.

from engagespot import Engagespot

client = Engagespot(api_key="ENGAGESPOT_API_KEY", api_secret="ENGAGESPOT_API_SECRET")

send_request = {
    "notification": {
        "workflow":{
            "identifier":"welcome-message-workflow"
        }
    },
    "sendTo":{
        "recipients": ["user-identifier"]
    }
}
    
response = client.send(send_request)

Refer Engagespot REST API Docs to get the list of all supported parameters.

Detailed Guide

Read Engagespot docs to learn how to build and send notification workflows.

About

Python library for communicating with Engagespot REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages