How to create Argo tunnel using API?

Hi 2 all,

On exists example with curl to create Cloudflare Tunnel :

curl -X POST "" \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json" \
     --data '{"name":"blog","tunnel_secret":"AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg="}'

I don’t understand what is the value X-Auth-Key and tunnel_secret? My goal instead commands

# ./cloudflared-linux-arm64 tunnel login
# ./cloudflared-linux-arm64 tunnel create tunnel-name

to use curl requests to API.

X-Auth-Key is generated on your profile. From the docs:

tunnel_secret is simply a base64 encoded password set by you which is used by anyone connecting to the tunnel in order to authenticate with the tunnel. If you need help encoding with base64, there are online tools that can help you such as this. Docs:

1 Like