I have implemented push notifications for Chrome & firefox. And testing using curl command on command line.
curl --header "Authorization: key=" --header "Content-Type: application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"\"]}"
I'm getting user end point from
reg.pushManager.subscribe({
userVisibleOnly:true
}).then(function(sub){
console.log("ENDPOINT :",sub.endpoint);
alert(sub.endpoint);
});
end point from chrome works fine
https://android.googleapis.com/gcm/send/cQ4-FwONCH0:APA91bGjycCynoIPO-BVn0h…B9Ck_r5e3hYxcvmzamCWeWbVLDSeY18gtp-NZC3yFMVzFQauE3xQQn4vhVmfkiV3ma-cy4wIv0
Registration ID for GCM from end point :
cQ4-FwONCH0:APA91bGjycCynoIPO-BVn0h…B9Ck_r5e3hYxcvmzamCWeWbVLDSeY18gtp-NZC3yFMVzFQauE3xQQn4vhVmfkiV3ma-cy4wIv0
But endpoint from Firefox(nightly) throws InvalidRegistration from gcm . ENDPOINT :
"https://updates.push.services.mozilla.com/wpush/v1/gAAAAABXqswopJKVeUQEsBZl12RXsKl01wNvt5T-yqLxgzReRPRdWp7K3xJK58Tmz9YWy3op550irfD3nx-DMnqNKu8BdzvbKgjlksN2_i8VJV-oWnkO8FJwgP-0-m4W9ZVNHYseLLDJ"
Registration ID for GCM
gAAAAABXqswopJKVeUQEsBZl12RXsKl01wNvt5T-yqLxgzReRPRdWp7K3xJK58Tmz9YWy3op550irfD3nx-DMnqNKu8BdzvbKgjlksN2_i8VJV-oWnkO8FJwgP-0-m4W9ZVNHYseLLDJ