surrealroad / Safari-Push-Notifications

Reference Server for pushing Safari Notifications via Apple Push Notification Service For use with Safari Push Plugin for Wordpress (https://github.com/surrealroad/wp-safari-push)
23 stars 9 forks source link

You have denied this website permission to send push notifications. #2

Closed mixman68 closed 10 years ago

mixman68 commented 10 years ago

Hello

I generated the certificate, pen file etc.. etc..`` but when i visit the push server

i have "You have denied this website permission to send push notifications."

I take more hours for search why it's display this but I don't found?

How can i use this service ?

mixman68 commented 10 years ago

I have a problem here

// * Authorisation code for requesting push notifications to be sent * // define('AUTHORISATION_CODE', 'password');

what is the AUTORISATION_CODE ?

surrealroad commented 10 years ago

For your first issue, check to see if there's anything in /logs (there may not be, Apple seem to have screwed this up on their end). I did also have that same issue, and it meant something wasn't configured correctly, usually the list of allowed host names, so check that.

surrealroad commented 10 years ago

The way that the push server receives instructions to send out a push to all devices, is via a POST call to /v1/push

Because this means that anyone could potentially send instructions to your server and trigger a push notification on your behalf if they knew what they were doing, I've mandated that a authorisation code also be included as part of the POST to the server. You define the code as whatever you want, but just make sure it's included when you issue a POST to the server.

mixman68 commented 10 years ago

For my first issue, where is log folder, Should I create the folder on my server ?

I created this on https://push.xpenradio.com

Gregory G

Le 7 nov. 2013 à 08:48, surrealroad notifications@github.com a écrit :

For your first issue, check to see if there's anything in /logs (there may not be, Apple seem to have screwed this up on their end). I did also have that same issue, and it meant something wasn't configured correctly, usually the list of allowed host names, so check that.

— Reply to this email directly or view it on GitHub.

mixman68 commented 10 years ago

New way ?

surrealroad commented 10 years ago

yes create a folder called logs. I've updated the source.

mixman68 commented 10 years ago

I created this, i go on the page but the logs folder seems to remain empty Le 11 nov. 2013 à 00:28, surrealroad notifications@github.com a écrit :

yes create a folder called logs. I've updated the source.

— Reply to this email directly or view it on GitHub.

surrealroad commented 10 years ago

It will only have a file if APNS sends a request to /v1/log. You can probably trigger this yourself by opening https://push.xpenradio.com/v1/log in a browser

mixman68 commented 10 years ago

Return in browser is

"No input file specified. »

Le 11 nov. 2013 à 00:40, surrealroad notifications@github.com a écrit :

It will only have a file if APNS sends a request to /v1/log. You can probably trigger this yourself by opening https://push.xpenradio.com/v1/log in a browser

— Reply to this email directly or view it on GitHub.

Er-Kalpesh commented 10 years ago

Hello,

I need help here 1)how to create pushpackage? what will be the URL to create push package? i am using https://www.domain.com/safari/index.php/pushPackages and changed code and set $function = $path[2]; but here whats the $version = $path[0] ? $body = json_decode($body, true); is empty $userid = $body["id"]; is empty too 2)how to use log?

surrealroad commented 10 years ago

@Er-Kalpesh please open a new issue if you are having problems. You should also refer to Apple's documentation AND the readme, specifically:

Requests must be mapped to /v1/request (for example https://push.yoursite.com/v1/pushPackages must be a valid URL) - the included .htaccess file should do this for you if you upload the files to the server root