Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

Hi,

I've fought with this for a couple of days now and can't find out where I'm going wrong.

I've configure the app from the tutorial and successfully got push messages received on the phone when sent from the console.

I've now set up the REST services for registration and Push from app. I've got the registration working, I can see the entry in the database.

But, I cannot get the push from app working, all I get (when testing in the browser) is: POST https://api.appery.io/rest/push/msg 400 (Bad Request)

I've also ran the APK on the phone, I get an error from the Service as well. Not sure how to show the error message in the alert though.

I've posted the screenshots of the setup below in the hope this helps:
Image
Image
Image
Image
Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

Hi Andy,

Please share the app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a.
What is the name of service?

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

I've shared it, thanks Katya.

Service is called SendPushService.
App is called push notifications.

many thanks

Andy

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

Also, it's on the second page, "sendpushnotifications", the first page "startScreen" is only for initialising push for the receiving of push notifications.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

Hello! You have to fill in service request fields: scheduledTime, timeZone and useDeviceTimeZone, it won't work without it.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

thanks Maryna,

I actually did that to get the response, and the test worked.

I have now tried using those parameters as well in the actual push service request, I dont get the error any longer :-) thanks for that, but I also didn't actually get a push to the device either?

Is there any way to get an immediate notification without scheduling?

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

Many thanks for this. I just received the first notification.

Can you tell me, is there a way to get the notification to be sent for now, or do I have to calculate the scheduled time every time?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

Instead request parameter schedule add parameter status with sent value

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

Fantastic! that worked a treat. Many thanks again.

Jose Gandia Ferrero
Posts: 0
Joined: Tue Dec 10, 2013 11:48 pm

Push from App - POST https://api.appery.io/rest/push/msg 400 (Bad Request)

Hi, I have the same problem...

I've configure the app from the tutorial and successfully got push messages received on the phone when sent from the console too.

The problem is the REST services for Push from app.

This is the Response in the test REST services

{
"status":"400 Bad Request",
"url":"https://api.appery.io/rest/push/msg",
"response":{
"code":"PNMN007",
"description":"Serialization error"
}
}

These are the screenshot of configuration Rest service.

Can you help me? Image Image Image

Return to “Issues”