I am working through the tutorial on setting up Cloud Messaging. I followed the instructions in the video on the page https://firebase.google.com/docs/cloud-messaging/js/client?authuser=0 when I try to send the curl command I get a strange error. I have read the Cloud Messaging quickstart as well as a few other pages trying to solve the error, but to no avail.
The command I entered on the command line is:
curl --header "Authorization: key=AIzaSyCFCmFwwWV53PqV2M-NUZyp6lYSz43tUiQ" --header "Content-Type: application/json" -d '{"to": "di6GZyDevbI:APA91bFhNMiuJaMIE3IQL2NurPCWBhCtzculj5uvx-on121Z0UczJ0FyiiQbaRFvGqNs3bmq084vQ-z-8vF_GZQ5J-QCBrWgp4_saWSwTXytZmScNbPLGRkOQns_QgETStDTmLJwixI1", "notification": { "title": "Hello", "body": "World", "icon": "/firebase_logo.png" }}' https://fcm.googleapis.com/fcm/send
The result is:
curl: (3) Port number ended with 'A'
curl: (6) Could not resolve host: notification
curl: (3) [globbing] unmatched brace in column 1
curl: (6) Could not resolve host: title
curl: (6) Could not resolve host: Hello,
curl: (6) Could not resolve host: body
curl: (6) Could not resolve host: World,
curl: (6) Could not resolve host: icon
curl: (3) <url> malformed
curl: (3) [globbing] unmatched close brace/bracket in column 1
JSON_PARSING_ERROR: Unexpected character (') at position 0.