Error after publishing post
-
After the last update the wordpress began presenting the seguite message when you made a new blog post:
OneSignal Push: There was a 400 error sending your notification:
HTTP/1.1 400 Bad Request
Date: Tue, 07 Jun 2016 12:11:16 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=de42595a3d1670bb652ccddbb549af78f1465301476; expires=Wed, 07-Jun-17 12:11:16 GMT; path=/; domain=.onesignal.com; HttpOnly
Status: 400 Bad Request
Cache-Control: no-cache
Access-Control-Allow-Origin: *
X-XSS-Protection: 1; mode=block
X-Request-Id: 1707df56-2267-40f1-9366-da7ed06385ef
X-Runtime: 0.005350
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-Powered-By: Phusion Passenger 5.0.28
Server: cloudflare-nginx
CF-RAY: 2af401731c37092c-DFW{“errors”:[“Segment or tag targeting requires a valid App REST API key.”]}
And push notifications are not sent.
Sending notifications by OneSignal site works normally.https://ww.wp.xz.cn/plugins/onesignal-free-web-push-notifications/
-
Hey there,
Thank you for posting those details! Yes, we intentionally added this message to help us quickly pinpoint the error if someone has an issue sending a notification. Sorry if the message is a little long (we post almost as much as we can to show as many details as possible).
In this case, it looks like the issue is that the “REST API Key” field on the Configuration tab of our WordPress plugin has an incorrect value. A common mistake is for people to enter their Google Server API Key value but this is incorrect. The correct value for the REST API Key is obtained by logging into onesignal.com, clicking your app, clicking “App Settings” on the left sidebar, and then clicking the “Keys & IDs” tab on the right pane.
Here is an image of it: https://notify.tech/wp-content/plugins/onesignal-free-web-push-notifications/views/images/settings/keys-2.jpg.
Go ahead and place the correct REST API Key value into that textbox, save your settings, and send another notification and it should work.
The topic ‘Error after publishing post’ is closed to new replies.