4

When writing node.js code with the parse javascript library, it's required to initialized it with the "JavascriptKey". When using the JavascriptKey and creating a push notification, it is required to turn on "client push". The parse interface says this about client push:

Allow pushes to be sent using the public client keys. Useful during development, but we suggest disabling it on production apps.

So, it seems like something I'd rather not keep on in production, especially since I'm only creating push notifications from the server.

Do I have to use the JavaScript key with node.js? Should I be going about all this a different way?

2
  • 2
    You know that Parse is going to shut down? Commented May 7, 2016 at 1:28
  • Yes, I am aware of that. Commented May 7, 2016 at 23:27

1 Answer 1

1

JavascriptKey is unnecessary, so it is optional in open-sourced Parse-Server.

Try to send push with MasterKey.

Parse.Push.send({
  where: query,
  data: {
    alert: "test"
  }
},{
  useMasterKey:true,
  success: console.log,
  error: console.error
});

If you host the Parse by yourself, you can setup it without JavascriptKey.

Some reference of open-sourced Parse-Server.

The client keys used with Parse are no longer necessary with Parse Server. https://github.com/ParsePlatform/parse-server

Client push is not supported. You can only use masterKey to send push notifications https://github.com/ParsePlatform/parse-server/wiki/Push

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.