Dynamically Add My Login IP to IP List?

How can I dynamically add the IP that I login to cloudflare (or even of my computer) with, to be added to my IP List?

Thank you.

You’d have to script it with the API. You can use curl to get your IP address:
curl ifconfig.me

How would one even begin to script something like this with cloudflare?

This isn’t scripted at Cloudflare. It has to be done at your end, as that’s where the IP address is. Here’s a rough start:

ipadr=`curl ifconfig.me`
curl -X PUT "https://api.cloudflare.com/client/v4/SOMEAPICALL/" \
     -H "X-Auth-Email: EMAIL" \
     -H "X-Auth-Key: API_KEY" \
     -H "Content-Type: application/json" \
     --data '{"WHATEVERYOURDATAIS","content":"'${ipadr}'"}'

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.