Sending a POST google cloud message

340 views
Skip to first unread message

Cássio Rossi

unread,
Feb 28, 2016, 4:28:20 PM2/28/16
to Automate
Does anybody has an example of a message sent by curl, python or telnet to google cloud message (Automate)?

I have used the http://llamalab.com/automate/cloud/ application form to generate the POST message However, when I send it using other client (like python  or curl) it does not work and I receive 500 (Internal error) or 401 (not authorized).

Any help is appreciated.

Best regards!

Cássio Rossi

Henrik "The Developer" Lindqvist

unread,
Feb 28, 2016, 5:38:00 PM2/28/16
to Automate
Error 401 mean you're using an obsolete/invalid secret, only one can be active at a time.

curl -d "secret=<secret goes here>&to=<recipient gmail>&device=&payload=Hello%20World" https://llamalab.com/automate/cloud/message

Remember to properly escape the secret and gmail, copy the body of the webform example.

Cássio Rossi

unread,
Feb 29, 2016, 7:31:29 AM2/29/16
to Henrik "The Developer" Lindqvist, Automate
My bad!

I was not sending the "to" parameter! :S

Thank a lot for your example!

Best regards,

Cássio Rossi

--
You received this message because you are subscribed to a topic in the Google Groups "Automate" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/automate-user/hJyjeDnPSZo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to automate-use...@googlegroups.com.
To post to this group, send email to automa...@googlegroups.com.
Visit this group at https://groups.google.com/group/automate-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/b69a88bd-1740-4d64-b561-37b94e3f750e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages