gotify / server

A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)
https://gotify.net
Other
10.43k stars 593 forks source link

I cannot send messages by using POSTs #629

Closed linuspauling1 closed 5 months ago

linuspauling1 commented 5 months ago

I have just pulled the docker image for gotify server and I don't know how to communicate with it by using the command line tool "curl". Here is what I tried to do vs what actually happened (my gotify server is configured to run on 8080 port):

$ curl POST "http://127.0.0.1:8080/message?token=CRZrW_txts1DiDX" -F "title=my title" -F "message=my message" -F "priority=5"
curl: (6) Could not resolve host: POST
{"error":"Unauthorized","errorCode":401,"errorDescription":"you need to provide a valid access token or user credentials to access this api"}
linuspauling1 commented 5 months ago

Now I have just noticed that I introduced the client's token instead of application's token. Problem solved.