Sending events to SendPulse email service bypassing authorization

Sometimes there is a need to start off a series of events bypassing the stage of authorization in SendPulse email service

To be able to send an unauthorized event you will need to know the contact's email address and their phone number (at least one of these parameters)
Also, you will need the so-called Event Hash value — it consists of 32 characters and you can find it here:

Log in to your SendPulse account, Open Automations menu

Open the Events Manager

Click on the event you need to activate

Copy that value from the Post Raw tab — it is the last but one block of characters, displayed after the /id/ block

Send this value together with the contact's email address and/or phone number

Example for PHP

<?php


require_once 'Automation360.php';

//Last parameter from "POST URL"
// https://login.sendpulse.com/emailservice/events/
$eventHash = '1898de13a69245jfj592d802ca8dceab4d';

$email = 'email@domain.com';
$phone = '380931112233';

$variables = [
    'user_id' => 123123,
    'event_date' => date('Y-m-d'),
    'firstname' => 'Name',
    'lastname' => 'Family',
    'age' => 23
];

$automationClient =  new Automation360($eventHash);


$result = $automationClient->sendEventToSendpulse($email, $phone, $variables);

if($result['data']['result']){
    echo 'Send request is completed';
}else {
    echo $result['data']['message'];
}

Example for Python


from Automation360 import Automation360


eventHash = '__EVENTHASH__'
variables = dict(
    user_id=1231231,
    firstName="Name",
    lastName="Family",
    age=23)
email = 'email@domain.com'
phone = '380931112233'

# if empty email or phone
# phone = None
# or
# email = None

automationClient = Automation360(eventHash)

result = automationClient.send_event_to_sendpulse(email, phone, variables)

print(result)
Rate this article about "Sending events to SendPulse email service bypassing authorization"

User Rating: 5 / 5 (4)

  • email

Other useful articles

Popular in Our Blog

Try SendPulse today for free