API endpoint to create new network member

The current ZeroTier API documentation does not describe the endpoint for adding a new network member. To accomplish this, we currently need to use the native ZeroTier app. My question is whether it is possible to achieve this using the ZeroTier API, such as by providing the user’s current public IP address or any similar method.

The way we’ve done this is the remote computer needs to try and join the network, then you authorize them to the network via the API. You set authorized:true.

With my local controller I do

curl -s -H "X-ZT1-Auth: $(cat /var/lib/zerotier-one/authtoken.secret)" -X POST -d '{"authorized": true}' "http://127.0.0.1:9993/controller/network/ztnetworkID/member/$1"

$1 is the zerotier ID of the computer you want to authorize onto the network. ztnetworkID is the network ID.

1 Like

That works
Thank you!)