MedAziz11 / Uptime-Kuma-Web-API

Uptime Kuma REST API
215 stars 43 forks source link

Curl example script (POST) not working #40

Open pigate-eu opened 1 year ago

pigate-eu commented 1 year ago

Hi,

I try the curl example script:

=== TOKEN=$(curl -X -L 'POST' -H 'Content-Type: application/x-www-form-urlencoded' --data 'username=admin&password=admin' http://127.0.0.1:8000/login/access-token/ | jq -r ".access_token")

curl -L -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://127.0.0.1:8000/monitors/

===

but curl do nothing. image

I replace only the port and password for Kuma API. Any suggestion?

alencarsouza commented 1 year ago

@pigate-eu see this: https://github.com/MedAziz11/Uptime-Kuma-Web-API/pull/42