# Sending push in afterSave trigger

**URL:** <https://community.parseplatform.org/t/sending-push-in-aftersave-trigger/4961>\
**Category:** JavaScript SDK\
**Tags:** cloud-code-trigger, push-notifications\
**Created:** [June 5, 2025, 3:54am UTC](https://community.parseplatform.org/t/sending-push-in-aftersave-trigger/4961 "2025-06-05T03:54:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adammlevy](https://community.parseplatform.org/user_avatar/community.parseplatform.org/adammlevy/32/800_2.png) [@adammlevy](https://community.parseplatform.org/u/adammlevy)\
**Post date:** [June 5, 2025, 3:54am UTC](https://community.parseplatform.org/t/sending-push-in-aftersave-trigger/4961/1 "2025-06-05T03:54:59Z")

</div>

I’m trying to send a push notification from an afterSave trigger but receiving the following error: `Error: {"message":"Cannot use the Master Key, it has not been provided.","code":141}`

Prior to upgrading to 3.x I was able to pass `{useMasterKey: true}` in the push call but now this doesn’t work.

---

<div class="post-metadata">

**Author:** ![adammlevy](https://community.parseplatform.org/user_avatar/community.parseplatform.org/adammlevy/32/800_2.png) [@adammlevy](https://community.parseplatform.org/u/adammlevy)\
**Post date:** [June 6, 2025, 12:17am UTC](https://community.parseplatform.org/t/sending-push-in-aftersave-trigger/4961/2 "2025-06-06T00:17:04Z")

</div>

Just realized that I wasn’t calling

```auto
Parse.initialize(process.env.APP_ID, process.env.JS_KEY, process.env.MASTER_KEY);

```

and now it’s working 🙂
