Closed Mayzz03 closed 3 years ago
401 Unauthorized and 403 is Forbidden.
Have you tried the demo project? https://github.com/coryjthompson/WebPushDemo
Hi, I am also having some problems with status code 403, but the demo project works, so it my code that does not work. I was therefore wondering about why we have this part:
var p256dh = base64Encode(subscription.getKey('p256dh')); var auth = base64Encode(subscription.getKey('auth'));
EDIT: Adding the encoding worked for me.
I might have a similar problem at hand.
When i use your package in my Dev Environment everything works like a charm even with remote debugging on my phone, so i sent it up to our staging Environment, which runs the application dockerized as micro services in the cloud.
Now i get the 403, any ideas whats causing this, could it be the different IP Addresses for service worker and Push Service?
The only difference which i could find so far, is that the dev environment is windows 10 and the stage are ubuntu containers.
I have similar problem and found out if i don't use VAPID key generated by Web-Push dll than it works fine. I just need to copy VAPID from google recommended site. Do you have any idea why VAPID generated by dll is not working?
@girishbhatt84 which site did you use to generate your VAPID key? So i can check if this would work for me too.
@epandasa Sorry for delay response, i used https://web-push-codelab.glitch.me/ but now i see even web-push-csharp library is working fine, not sure how but now all the generated key works. One tips: try to send subscription as it is from front-end to back-end without any kind of parsing, i suspect that could be a reason for error as well.
Hello,
I got 403 or 401 error in all cases.
I tried with:
For each I tried with gcm and vapid
vapid is from FCM console, but I tried to generate with the lib.
Any idea ?