You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get Exception : "Master key is invalid, you should only use master key to send push"
I don't understand where i supposed to enter the master key
In Android :
androidQuery.whereEqualTo("deviceType", "android");
ParsePush androidPush = new ParsePush();
androidPush.setQuery(androidQuery);
androidPush.setData(androidData);
Log.i("androidData=", androidData + "");
Log.i("LOG", "Sending Android");
androidPush.sendInBackground(new SendCallback() {
@Override
public void done(ParseException e) {
if (e == null) {
With parse-server (and hosted parse too), you should not sent push notifications from the client (because then anyone can spam all of your users with push notifications.) Call a cloud function instead, and send them from cloud code by passing the { useMasterKey: true } option as a second parameter... See #564.
I get Exception : "Master key is invalid, you should only use master key to send push"
I don't understand where i supposed to enter the master key
In Android :
androidQuery.whereEqualTo("deviceType", "android");
ParsePush androidPush = new ParsePush();
androidPush.setQuery(androidQuery);
androidPush.setData(androidData);
Log.i("androidData=", androidData + "");
Log.i("LOG", "Sending Android");
androidPush.sendInBackground(new SendCallback() {
IOS:
PFPush *androidPush = [[PFPush alloc] init];
[androidPush setQuery:androidQuery];
[androidPush setData:androidData];
NSLog(@"Sending Android Data");
[androidPush sendPushInBackgroundWithBlock:^(BOOL succeeded, NSError *error){
if (succeeded) {
My Server Settings:
var api = new ParseServer({
databaseURI: databaseUri,
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID,
masterKey: process.env.MASTER_KEY,
push: {
android: {
senderId: '12345678',
apiKey: 'My apikey'
},
ios: [
{
pfx: '/cer/developmentcertificate.p12',
bundleId: 'bundleId',
production: false // Dev
},
{
pfx: '/cer/distributioncertificate.p12',
bundleId: 'bundleId',
production: true // Prod
}
]
}
});
The text was updated successfully, but these errors were encountered: