Create peer for wireguard via API

Started by c0nnected, March 09, 2024, 08:43:16 PM

Previous topic - Next topic
Hi,
I'm struggling with creating peers via API for my wireguard. I've managed to build this curl:

curl -X POST \
  -d '{ "clients": [ { "enabled": true, "name": "apitest", "pubkey": "pub_key_value", "tunneladdress": "10.1.1.100/32", "serveraddress": "192.168.62.105", "serverport":51280, "keepalive": 25} ]}' \
  -H "Content-Type: application/json" \
  -k \
  -u "key:secret" \
  https://IP:443/api/wireguard/client/set


as a result of this curl im getting response:
{"result":"saved"}

The problem is in gui I don't see this user, any idea why it doesn't work?