Skip to main content

I am trying to Set up API-Based transactional events for Reset Password as explained with new SDK

https://developers.klaviyo.com/en/v1-2/docs/guide-to-setting-up-api-based-transactional-events

 

$body =

    'data' => t

        'event' => 'Reset Password',

        'customer_properties' => i

            '$email' => 'dinesh.dhaker.88@gmail.com'

        ],

        'properties' => Â

            '$event_id' => rand(1000, 9999),

            'PasswordResetLink' => "https://otc.com/reset/1234567890987654321"

        ],

        'time' => time()

    ]

];

 

try {

    $response = $klaviyo->Events->createEvent($body);

    ////$response = $klaviyo->Events->getEvents();

    echo '<pre>';

    print_r($response);

} catch (Exception $e) {

    echo '<pre>';

    print_r($e);exit;

}

But getting error as below

KlaviyoAPI\ApiException Object(    gresponseBody:protected] => {"errors":c{"id":"8a3fd160-73a1-468b-9bae-686baac0640d","status":400,"code":"invalid","title":"Invalid input.","detail":"The payload provided in the request is invalid.","source":{"pointer":"/data"},"meta":{}}]})So someone can help me how I can setup Reset Password Email using API.Thanks

 

Hi @dineshdhaker,

 

I see that you opened a Support ticket and that this issue was resolved by turning of Smart Sending on your flow. 

 

I’m going to throw the new version of that Developer Portal doc here for anyone else that might come across this:

 

Thanks for using the Community!

- Brian 

 


Reply