I'm looking at the webpush-java code.
I tried to send a notification using the CLI tools
java -jar build/libs/web-push-3.1.0-all.jar send-notification, etc.. etc..
... But this causes a HTTP/1.1 400 UnauthorizedRegistration. What might cause this?
UPDATE: I repeated the send-notification with new keys and subscription... and this time I noticed further error diagnostics:-
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. HTTP/1.1 400 UnauthorizedRegistration [Content-Type: text/html; charset=UTF-8, Date: Fri, 16 Mar 2018 10:02:46 GMT, Expires: Fri, 16 Mar 2018 10:02:46 GMT, Cache-Control: private, max-age=0, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, X-XSS-Protection: 1; mode=block, Server: GSE, Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303335,quic=":443"; ma=2592000; v="41,39,35", Accept-Ranges: none, Vary: Accept-Encoding, Transfer-Encoding: chunked] [Chunked: false]
400 UnauthorizedRegistrationis caused by VAPID errors: make sure that VAPID keys are configured properly and that you are using the correct key to sign the requests - collimarco